about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)Author
2012-09-11Merge branch 'xop' of https://github.com/kart0ffelsack/ngircd into bug92-xopAlexander Barton
* 'xop' of https://github.com/kart0ffelsack/ngircd: Tests and documentation for xop Implemented xop support Conflicts (because of merge of the 'cmode-M' branch): src/ngircd/channel.c src/ngircd/defines.h src/ngircd/messages.h
2012-09-11Show a warning on startup if config file is not a full pathAlexander Barton
ngIRCd is a long-running process and changes its working directory to "/" to not block mounted filesystems and the like when running as daemon ("not in the foreground"); therefore the path to the configuration file must be relative to "/" (or the chroot() directory), which basically is "not relative", to ensure that "kill -HUP" and the "REHASH" command work as expected later on. This fixes parts of bug #127.
2012-09-10Create &SERVER channel after predefined channelsAlexander Barton
This patch allows you to define &SERVER in a [Channel] block yourself and to overwrite the built-in topic and channel modes. Fixes bug #131.
2012-09-10WHO #channel: don't limit list sizeAlexander Barton
It makes no sense to limit the list size when doing WHO for a channel and not to return all the users in that channel, so I removed the check. But if there are more than MAX_RPL_WHO(25) replies, the client requesting the list will be "penalized" one second more (then 2 in total). This fixes bug #125.
2012-09-04Define EV_SET() for kqueue() on systems that don't have itAlexander Barton
Some systems, notably FreeBSD 4.x, do have the kqueue() function but lack the definition of EV_SET() in their header files -- but don't worry, we can #define it on our own ;-) Definition taken from /usr/include/sys/event.h of FreeBSD 8.1. Patch tested on FreeBSD 4.1 by Götz Hoffart. Thanks!
2012-08-29New function Conn_StartLogin() to finish connection initializationAlexander Barton
Conn_StartLogin() is called after the connection has been established and fully innitialized, including the SSL handshake, for example. Up to this patch, the "NoticeAuth" option broke the SSL handshake ...
2012-08-29Convert CONN_ID and Conf_MaxConnections to "int" datatypeAlexander Barton
We can't handle more connections than accept(2) can supply, and accept(2) returns an "int" ...
2012-08-28Introduce numeric RPL_HOSTHIDDEN_MSG(396)Alexander Barton
This numeric is sent to the client each time it changes its displayed hostname using "MODE +/-x", and if "CloakHost" is set right after the MOTD has been sent.
2012-08-28Always cloak client hostname, if neededAlexander Barton
Not only cloak the hostname in Client_MaskCloaked(), but also in Client_HostnameCloaked() -- so move the actual cloaking to this function and call it in Client_MaskCloaked() to get the (cloaked) hostname. This fixes USERHOST not displaying the correctly cloaked hostname, for example.
2012-08-28NoticeAuth: make sure messages are flushed immediatelyAlexander Barton
2012-08-27Merge branch 'umode-B'Alexander Barton
This patch series allows ngIRCd to support the user mode "B" ("Bot flasg"): it is settable and unsettable by every (non-restricted) client. According to DNS777, this is how Unreal and InspIRCd do behave, so do we :-) By Alexander Barton (1) and DNS777 (1) * umode-B: Add new user mode "B" to doc/Modes.txt Implement an Unreal-like user mode "B" ("Bot mode")
2012-08-27Merge branch 'recognize-umode-R'Alexander Barton
By Alexander Barton (1) and DNS777 (1) * recognize-umode-R: Only allow IRC services to modify user mode "R" Recognize user mode "R"
2012-08-27Only allow IRC services to modify user mode "R"Alexander Barton
2012-08-27ngt_RandomStr(): : make it buildable with pre-ANSI C compilersAlexander Barton
2012-08-27Get_CAP_String(): make it buildable with pre-ANSI C compilersAlexander Barton
2012-08-27Enhance "NOTICE AUTH": show hostname and IDENT replyAlexander Barton
2012-08-27Merge branch 'cmode-M'Alexander Barton
By Alexander Barton (2) and DNS777 (1) * cmode-M: Add new channel mode "M" to doc/Modes.txt Remove Can_Send_To_Channel_Identified() Implement channel mode "M"
2012-08-27Remove Can_Send_To_Channel_Identified()Alexander Barton
Move the functionality directly into Can_Send_To_Channel() function. There should be no functional change ...
2012-08-26Merge branch 'better-chan-errors'Alexander Barton
By Alexander Barton (1) and DNS777 (1) * better-chan-errors: Remove unused ERR_CANNOTSENDTOCHAN2_MSG message Add some more information to channel error numerics
2012-08-26Merge branch 'move-connection-password' of git://arthur.barton.de/ngircd-alexAlexander Barton
This patch series converts the statically allocated password buffer in the CLIENT structure into a dynamically (and only when needed) allocated buffer which is referenced by the CONNECTION structure. This a) saves memory for clients not using passwords at all and b) allows for "arbitrarily" long passwords. By Brett Smith (5) and Alexander Barton (2). * 'move-connection-password' of git://arthur.barton.de/ngircd-alex: Login_User(): use "conn" insted of calling Client_Conn(Client) Free already saved password when storing a new one Indentation and style fixes. Connection password is not constant. Implementation clean-ups. Dynamically allocate memory for connection password. Move client password from the Client to the Connection struct.
2012-08-26Login_User(): use "conn" insted of calling Client_Conn(Client)Alexander Barton
2012-08-26Free already saved password when storing a new oneAlexander Barton
This shouldn't happen (clients aren't allowed to send more than one PASS command), but who knows ...
2012-08-26Implement channel mode "M"DNS777
Only the server, identified users and IRC operators are able to talk.
2012-08-26Remove unused ERR_CANNOTSENDTOCHAN2_MSG messageAlexander Barton
2012-08-26Add some more information to channel error numericsDNS777
2012-08-26Implement an Unreal-like user mode "B" ("Bot mode")DNS777
2012-08-26Recognize user mode "R"DNS777
This allows users to unset the user mode "R".
2012-08-26Enhance "ServiceMask" to handle a list of masksAlexander Barton
The "ServiceMask" variable in "Server" blocks now can handle more than one mask using the new MatchCaseInsensitiveList() function. This makes marking "service clients" much more specific, which is a good thing per se, but which is the prerequisite for reasonably blocking these nick names, too (see commit a6dd2e3 for details).
2012-08-26New function MatchCaseInsensitiveList() to check list of patternsAlexander Barton
2012-08-26Block nicknames that are reserved for servicesAlexander Barton
This patch introduces the new function Conf_NickIsBlocked() which checks if a given nick name matches with the "service mask" of a configured server. And Client_CheckNick() uses this information to deny such names for regular IRC users. So nick names intended for IRC services are more protected and can't be used by regular users even when the "services pseudo-server" isn't connected to the network. But please note: Up to now, there can be only one "ServiceMask" pattern per server, which most probably blocks much more nick names than really required ... So "ServiceMask" should allow more than one pattern which can be more specific, and most probably it should be possible to block nick names in the global server configuration as well. Nick names introduced by other servers/services are never restricted.
2012-08-26Rename Conf_IsService() to Conf_NickIsService()Alexander Barton
2012-08-26Check_Connections(): code cleanupAlexander Barton
2012-08-23Indentation and style fixes.Brett Smith
2012-08-23Connection password is not constant.Brett Smith
Saying otherwise makes a warning when we assign this to conv.appdata_ptr in pam.c.
2012-08-23Implementation clean-ups.Brett Smith
* Have Conn_Password return an empty string when no password has been set, to play better with pam.c. * Use strdup in Conn_SetPassword.
2012-08-23Dynamically allocate memory for connection password.Brett Smith
2012-08-23Move client password from the Client to the Connection struct.Brett Smith
This is a relatively naive implementation, basically doing the bare minimum necessary to make the switchover go. Subsequent commits can focus on improving the implementation.
2012-08-18ngt_RandomStr(): Add implicit cast to "unsigned".Alexander Barton
This fixes the following warning of Xcode 4.5: src/tool/tool.c:150:19: Implicit conversion loses integer precision: 'long' to 'unsigned int'
2012-08-16Fix a buffer overflow when initializing the random salt for "+x"Alexander Barton
This "off by one" buffer overflow has been introduced in commit 49385a98, "Implemented hashed cloaked hostnames for +x".
2012-08-06Tests and documentation for xopSebastian Köhler
2012-08-06Implemented xop supportSebastian Köhler
3 new channel user modes have been added. Half Op: +h(Prefix: %) can set the channel modes +imntvIbek and kick all +v and normal users. Admin: +a(Prefix: &) can set channel modes +imntvIbekoRsz and kick all +o, +h, +v and normal users. Owner: +q(Prefix: ~) can set channel modes +imntvIbekoRsz and kick all +a, +o, +h, +v and normal users
2012-08-06Fix compiler warning when not building with ZLIB supportAlexander Barton
This fixes: irc.c: In function ‘Option_String’: irc.c:333:9: error: variable ‘options’ set but not used
2012-08-03Hashed hostnames for CloakHostSebastian Köhler
Implemented support for hashed hostnames for CloakHost. The admin can use '%x' in both the CloakHost and CloakHostModeX setting. The config option CloakHostModeX was renamed to CloakHostSalt. This salt is used for both cloaking options.
2012-08-03Implemented hashed cloaked hostnames for +xSebastian Köhler
CloakHostModeX can now contain '%x'. It will be replace by the hash of the original client hostname. The new config option CloakHostModeXSalt defines the salt for the hash function. When CloakHostModeXSalt is not set a random salt will be generated after each server restart. Spelling fix in defines.h
2012-06-09Rename "CloakModeHost" option to "CloakHostModeX"Alexander Barton
2012-06-09Introduce new configuration option "CloakModeHost"Christoph Biedl
This closes bug #124.
2012-06-09Correctly handle asynchronously re-established server linksAlexander Barton
Don't try to establish an outgoing server link after DNS lookup when this server re-connected on its own in the meantime. In addition, log a warning message if we try to update the connection index of an already connected server structure -- and ignore it. Up to now, both behaviour could lead to a race when the remote server connects to this daemon while it still prepares the outgoing connection: - The local server prepares the new outgoing connection ... - in the meantime the remote server becomes connected and registered. - Now the new outgoing connection overwrites the (correct) socket handle, - then the 2nd connection becomes disconnected: "already registered", - and the 1st connection becomes unhandled ("gets lost") because the configuration structure is reset because of the wrong socket handle. This patch hopefully fixes all these problems.
2012-06-08Log a debug message when SIGUSR2 is handledAlexander Barton
2012-06-02NoticeAuth: Fix test if IDENT reply has been invalidAlexander Barton
This fixes conn.c: In function ‘cb_Read_Resolver_Result’: conn.c:2252: warning: comparison between pointer and integer
2012-06-02IDENT reply: only allow alphanumeric characters in user nameAlexander Barton
Only alphanumeric characters are allowed in the user name, so ignore all IDENT replies that would violate this rule and use the one supplied by the USER command.