summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)Author
2012-03-12Fix gcc warning, initialize "list" variable to NULLAlexander Barton
This fixes the following warning with gcc 4.6.3.: irc-mode.c: In function "Channel_Mode": irc-mode.c:947:26: error: "list" may be used uninitialized in this function irc-mode.c:884:25: error: "list" may be used uninitialized in this function (The variable has never been used uninitialized, so don't worry)
2012-03-12Fix typo: recieved -> receivedAlexander Barton
Thanks to Christoph Biedl.
2012-03-03getpid.sh: Fix testcase error for Debian using sbuildChristoph Biedl
When * building the ngircd Debian package (on Linux at least) and * using the sbuild build system, the command "ps -af" does not include the commands running inside the sbuild system. Therefore, start-server.sh will report a fail as getpid.sh cannot not find the ./T-ngircd1 just started although it's actually running. This results in a funny build log ... starting server 1 ... failure! FAIL: start-server1 running connect-test ... ok. PASS: connect-test The self-test of getpid.sh however will likely succeed as it's happy if it sees any process with "sh" somewhere in the name. Things go downhill from there. The confusing things are: * The alternative cowbuilder/pbuilder does not have this problem. * The alternative usage "ps ax" does fine. So, as a quick hack, the patch attached adds another switch to getpid.sh.
2012-03-02Don't log "ngIRCd hello message" two timesAlexander Barton
Start "regular" logging not until the configuration file has been read in and "SyslolgFacility" is set, and log all configuration errors using the generic "daemon" facility. So if there are no configuration errors, logging starts right after parsing the configuration and we log the configuration file used _after_ reading it. But this is no problem because every configuration error message includes the configuration file name as well. (The "double hello" has been introduced by commit 3641e5110952)
2012-02-26Don't accept "[SSL]" in config when no SSL support is built inAlexander Barton
2012-02-26Fix C syntax: duplicate ";;" should be ";"Alexander Barton
Using gcc 2.7.2, this fixes: irc-channel.c: In function `join_allowed': irc-channel.c:86: parse error before `const'
2012-02-14Correctly re-open syslog logging after reading of configurationAlexander Barton
Syslog logging has been initialized before reading the configuraton file, so ngIRCd always used the default facility and ignored the "SyslogFacility" configuration option. Thanks to Patrik Schindler for reporting this issue!
2012-02-14Logging: remove "Activating ..." info messageAlexander Barton
2012-02-12Fix forwarding of LIST commandsAlexander Barton
Bug reported by Cahata, thanks!
2012-01-25New_Connection(): don't set the client hostname twiceAlexander Barton
Setting the hostname twice doesn't do much harm a lot, but isn't elegant. And for IPv6 addresses, it isn't correct the first time (missing []) ...
2012-01-25Client_SetHostname(): Code cleanup, more debug loggingAlexander Barton
2012-01-24io: use define for number of possible eventsFlorian Westphal
2012-01-24io: remove outer do {} while loops for epoll/kqueue/devpoll backendsFlorian Westphal
simplifies things a bit. io_dispatch() is called repeatedly from the main loop.
2012-01-24Enhance server command limitsAlexander Barton
This patch updates the limits for handling commands from a remote server: - "<user count> / 5 + <min>" using "<min>=10" during normal operation, - the above count multiplied with 5 while servers are syncing. The intention is to a) make the limit dependent of the number of users in the network (the more users, the more commands required to sync) and b) to significantly rise this limit while servers are joining the network to make the login and synchronization faster.
2012-01-24Send a PING at the end of the server sync to detect itAlexander Barton
At the end of sending all "state" to the remote server, a PING command is sent to request a PONG reply. Until then, no "regual" PING was sent, so Conn_LastPing(<connection>) is null and now becomes non-null in the PONG command handler. So the servers are still synchronizing when Conn_LastPing(<connection>) is 0, which could easily be tested.
2012-01-24New function Conn_UpdatePing() to update the "ping timestamp"Alexander Barton
2012-01-24Conn_UpdateIdle(): Code cleanupAlexander Barton
2012-01-23RPL_ISUPPORT_MSG(005): add "EXCEPTS=e INVEX=I"Alexander Barton
Thanks to Cahata for the idea!
2012-01-23Fix "MAXLIST=beI:50": the limit is the sum of all listsAlexander Barton
"Modes which are specified in the same pair share the same maximum size", so "beI:50" means a total of 50 entries, regardless of the list. See <http://www.irc.org/tech_docs/draft-brocklesby-irc-isupport-03.txt>, thanks to Cahata for reporting this!
2012-01-22New RPL_WHOISHOST_MSG(378): show hostname and IP addressAlexander Barton
The numeric RPL_WHOISHOST_MSG(378) returns the DNS hostname (if available) and the IP address of a client in the WHOIS reply. Only the user itself and local IRC operators get this numeric.
2012-01-22New function Conn_GetIPAInfo(): get IP address of a connectionAlexander Barton
2012-01-22G/K-Lines: only add and delete valid IRC masksAlexander Barton
2012-01-22Check G/K-Lines before the client has been registered, tooAlexander Barton
This allows to use "*!<user>@<host>" or "*!*@<host>" masks to reject clients even before receiving PASS, NICK and USER commands and before forking authentication child processes which reduces resource usage.
2012-01-22Streamline handling of connection rejects (bad password, G/K-line)Alexander Barton
- Use Client_Reject(), get rid of Reject_Client(). - Refactor Class_IsMember() to Class_GetMemberReason(), - New function Class_HandleServerBans().
2012-01-22New function Client_Reject() to reject clients on connectAlexander Barton
2012-01-22New function Lists_CheckReason() to get reason of list entriesAlexander Barton
2012-01-22Fix ERR_{SUMMON|USERS}DISABLED: don't repeat command name in replyAlexander Barton
2012-01-21Implement channel exception list (mode 'e')Alexander Barton
This allows a channel operator to define exception masks that allow users to join the channel even when a "ban" would match and prevent them from joining: the exception list (e) overrides the ban list (b).
2012-01-21{Add|Del}_Ban_Invite > {Add_To|Del_From}_List(): more genericAlexander Barton
2012-01-21Rename ShowInvitesBans() to ShowChannelList(), make it more flexibleAlexander Barton
2012-01-21PRIVMSG/NOTICE: handle nick!user@host masks case-insensitiveAlexander Barton
And enhance our test suite to check this a little bit better :-)
2012-01-16PRIVMSG/NOTICE: don't stop list processing on invalid targetAlexander Barton
Process further targets, even if one has been a server ID: just skip this one with an error message and continue.
2012-01-16Implement user mode 'C': require "same channel" to send messageAlexander Barton
If the target user of a PRIVMSG or NOTICE command has the user mode 'C' set, it is required that both sender and receiver are on the same channel. This prevents private flooding by completely unknown clients.
2012-01-16New RPL_WHOISREGNICK_MSG(307) numeric: indicate if nick is registeredAlexander Barton
2012-01-16IRC_WHOIS_SendReply(): Code cleanupAlexander Barton
2012-01-16Limit channel invite and ban lists to 50 entriesAlexander Barton
- New function Lists_Count(). - New limit #define MAX_HNDL_CHANNEL_LISTS = 50. - New numeric #define ERR_LISTFULL_MSG(478). - Adjust numeric RPL_ISUPPORT2_MSG(005) accordingly ("MAXLIST")
2012-01-16Make Send_ListChange() a little bit more genericAlexander Barton
2012-01-15Remove unused prototype of Lists_AlreadyRegistered()Alexander Barton
This prototype has been introduced by commit fa7bb279 in 2006, but as far as I can see, this function never existed ...
2012-01-15Channel lists: Fix duplicate check and error messagesAlexander Barton
- Check correct list for duplicates when adding items. - Don't generate any messages when adding duplicates or removing non-existing items (this is how ircd-seven and ircu behave). - Code cleanup: Add_Ban_Invite(), Del_Ban_Invite().
2012-01-15Don't enforce MAX_HNDL_MODES_ARG on server and service linksAlexander Barton
2012-01-13Don't stop join handling on faulty channel, skip it (part #2)Alexander Barton
Commit 565523cb allowed processing of further channel names given to the JOIN command when a single name was invalid. After this patch, the JOIN command handler continues to process channel name lists even after errors like "channel is full", "too many channels", and the like and generates appropriate error messages for all the channels given by the client.
2012-01-13JOIN command: don't check channel limit if already memberAlexander Barton
Don't check the channel limit and don't report "too many channels" when trying to join a channel that the client is already a member of.
2012-01-09Return ERR_UNKNOWNMODE(472) for unknown channel modesAlexander Barton
The daemon reported ERR_UMODEUNKNOWNFLAG(501), which is wrong.
2012-01-09Numberic 005 (ISUPPORT), CHANMODES: add "O", "R", "z" modesAlexander Barton
2012-01-06Limit list replies of LIST, WHO, WHOIS, and MAX_RPL_WHOWASAlexander Barton
Introduce new #define's MAX_RPL_LIST(100), MAX_RPL_WHO(25), MAX_RPL_WHOIS(10), and MAX_RPL_WHOWAS(25).
2012-01-06New function IRC_CheckListTooBig() to check size of list repliesAlexander Barton
It the limit is reached, a NOTICE is sent to the client and list processing should stop.
2012-01-06LIST command: compare pattern case insensitiveAlexander Barton
2012-01-06IRC_LIST(): Code cleanupAlexander Barton
2012-01-06DEFAULT_WHOWAS->DEF_RPL_WHOWAS; MAX_CMODES_ARG->MAX_HNDL_MODES_ARGAlexander Barton
To streamline naming, in preparation for MAX_RPL_WHO and MAX_RPL_WHOWAS :-)
2012-01-06defines.h: Code cleanup and (a little bit) more documentationAlexander Barton