1
0
mirror of https://github.com/osmarks/ngircd.git synced 2024-12-12 09:50:29 +00:00

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

This should be more efficient.
This commit is contained in:
Alexander Barton 2015-08-01 14:21:32 +02:00
parent 90ea23ab4f
commit b8482fd3cf

View File

@ -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),