mirror of
https://github.com/osmarks/ngircd.git
synced 2025-11-07 09:13:03 +00:00
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.
This commit is contained in:
@@ -369,6 +369,12 @@ IRC_JOIN( CLIENT *Client, REQUEST *Req )
|
|||||||
|
|
||||||
/* Local client? */
|
/* Local client? */
|
||||||
if (Client_Type(Client) == CLIENT_USER) {
|
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 */
|
/* Test if the user has reached the channel limit */
|
||||||
if ((Conf_MaxJoins > 0) &&
|
if ((Conf_MaxJoins > 0) &&
|
||||||
(Channel_CountForUser(Client) >= Conf_MaxJoins))
|
(Channel_CountForUser(Client) >= Conf_MaxJoins))
|
||||||
|
|||||||
Reference in New Issue
Block a user