From: Alexander Barton Date: Fri, 13 Jan 2012 09:40:20 +0000 (+0100) Subject: JOIN command: don't check channel limit if already member X-Git-Tag: rel-19-rc1~41 X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=ngircd-alex.git;a=commitdiff_plain;h=77f68b4fd140404848e203a6634ecd472294723f JOIN command: don't check channel limit if already member 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. --- diff --git a/src/ngircd/irc-channel.c b/src/ngircd/irc-channel.c index 52ba0930..196b5477 100644 --- a/src/ngircd/irc-channel.c +++ b/src/ngircd/irc-channel.c @@ -369,6 +369,12 @@ IRC_JOIN( CLIENT *Client, REQUEST *Req ) /* Local client? */ if (Client_Type(Client) == CLIENT_USER) { + if (chan) { + /* Already existing channel: already member? */ + if (Channel_IsMemberOf(chan, Client)) + goto join_next; + } + /* Test if the user has reached the channel limit */ if ((Conf_MaxJoins > 0) && (Channel_CountForUser(Client) >= Conf_MaxJoins))