about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)Author
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
2012-01-06RPL_ISUPPORT (numeric 005): Report MODES=<MAX_CMODES_ARG>Alexander Barton
"Maximum number of channel modes with parameter allowed per MODE command." See <http://www.irc.org/tech_docs/005.html> for details.
2012-01-06Channel modes: really break handling when MAX_CMODES_ARG is hitAlexander Barton
This fixes 98493077.
2012-01-06channel modes: only handle MAX_CMODES_ARG modes with argumentsAlexander Barton
Limit the MODE command to handle a maximum of MAX_CMODES_ARG (5) channel modes that require an argument (+Ibkl) per call. Please note: Further modes that require arguments are silently ignored and end the handling of any further modes. This is similar to the behavior of ircd2.11 (silently ignores but seems to handle other modes) as well as ircd-seven (silently ignores but handles some(!) other modes) ...
2012-01-06Fix handling of channel mode sequence with/without argumentsAlexander Barton
For example, don't generate wrong error messages when handling "MODE #chan +IIIIItn *!aa@b *!bb@c *!cc@d *!dd@e *!ee@f".
2012-01-06Conn_Write(): Make sure there is a client when detecting its typeAlexander Barton
The assert(client != NULL) got triggered during our tests, so there is an error path that resulted in the connection being still established (sock >= 0) but the client structure already freed. So Conn_Write() should handle it!
2012-01-06Proc_Close(): Only close socket if it is still validAlexander Barton
It could be invalid when calling Proc_Close() a 2nd time, for exmaple, which could happen when we hit a timeout doing IDENT requests :-(
2012-01-05WHOIS command: make sure matching is case-insensitiveAlexander Barton
And make sure that RPL_ENDOFWHOIS replies with the unmodified mask like it has been received from the client.
2012-01-05WHOIS command: don't anser queries for IRC serversAlexander Barton
Thanks to Cahata for spotting this!
2012-01-05WHOIS command: make sure the reply ends with RPL_ENDOFWHOISAlexander Barton
Up to now, each reply for itself ended in RPL_ENDOFWHOIS and queries for unknown nick names lacked the RPL_ENDOFWHOIS -- both is wrong.
2012-01-04LINKS command: support <mask> parameterAlexander Barton
The <mask> can be used to limit the servers shown in the listing.
2012-01-04IRC_LINKS(): Code cleanup; more documentationAlexander Barton
2012-01-04Add 1 second penalty for every further target on PRIVMSG/NOTICEAlexander Barton
This reduces the possibility of flooding channels with commands like "PRIVMSG/NOTICE #a,#n,#c,... :message" a little bit. Problem noticed by Cahata -- thanks!
2012-01-04Conn_SetPenalty(): Add new "penalty time" on each function callAlexander Barton
Until now, the penalty time has only been set when longer as the already set one, so it didn't accumulate. And add documentation for and clean up code in Conn_SetPenalty() and Conn_ResetPenalty() functions.
2012-01-03Enhance log messages when setting user and groupAlexander Barton
2012-01-03NGIRCd_getNobodyID(): Code cleanupAlexander Barton
2012-01-03Display correct error message when "Server{UID|GID}" is invalidAlexander Barton
This partly closes bug #118. ngIRCd still starts up even when Server{UID|GID} is invalid: then the daemon falls back to "nobody" when running with root(0) privileges (as before).
2012-01-03NGIRCd_Init(): Code cleanupAlexander Barton
2012-01-03main(): Code cleanupAlexander Barton
2012-01-03Update Copyright notices for 2012Alexander Barton
2012-01-02lists: don't crash if reason ptr is NULLFlorian Westphal
commit 15fec92ed75c3de0b32c40d005e93e3f61aef77e (Update list item, if it already exists) can make ngircd crash because 'Reason' can be NULL, as reported by Cahata on the ngircd mailing list. Doesn't affect any released ngircd versions. Also, make sure that we do not pass NULL as arguments to a '%s' printf-like function.
2012-01-02Don't stop join handling on faulty channel, skip itAlexander Barton
When JOIN is received with more than one channel name, don't stop processing on the first error (e.g. bad name, wrong channel key, ...) but report an error and continue with the other given channel names. Reported by Cahata -- thanks!
2012-01-02IRC_JOIN(): Code cleanupAlexander Barton