ngircd

Free, portable and lightweight Internet Relay Chat server http://ngircd.barton.de/
Log | Files | Refs | README | LICENSE

commit b8482fd3cfdb429aec75575958f4d5d4e9ae22df
parent 90ea23ab4fe3032824e22eb59bee305f35c4aae7
Author: Alexander Barton <alex@barton.de>
Date:   Sat,  1 Aug 2015 14:21:32 +0200

First check if channel has mode "N", then check membership

This should be more efficient.

Diffstat:
Msrc/ngircd/irc-login.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/ngircd/irc-login.c b/src/ngircd/irc-login.c @@ -266,8 +266,8 @@ IRC_NICK( CLIENT *Client, REQUEST *Req ) !Client_HasMode(Client, 'o')) { chan = Channel_First(); while (chan) { - if(Channel_IsMemberOf(chan, Client) && - Channel_HasMode(chan, 'N')) + if(Channel_HasMode(chan, 'N') && + Channel_IsMemberOf(chan, Client)) return IRC_WriteErrClient(Client, ERR_NONICKCHANGE_MSG, Client_ID(Client),