X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=ngircd-alex.git;a=blobdiff_plain;f=src%2Fngircd%2Firc-login.c;h=9fca622ba0ea66422940e2d71dc2dff0d5f2eee4;hp=10885f281ef4ce2b4adc3df97c06356ab074e227;hb=b8482fd3cfdb429aec75575958f4d5d4e9ae22df;hpb=7ff16e81163b3bee43ce053cb86fb2df2a023d53 diff --git a/src/ngircd/irc-login.c b/src/ngircd/irc-login.c index 10885f28..9fca622b 100644 --- a/src/ngircd/irc-login.c +++ b/src/ngircd/irc-login.c @@ -262,11 +262,12 @@ IRC_NICK( CLIENT *Client, REQUEST *Req ) /* Nickname change */ /* Check that the user isn't on any channels set +N */ - if(!Client_HasMode(Client, 'o')) { + if(Client_Type(Client) == CLIENT_USER && + !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),