commit - adfe5affedac5dcf3f66a1a8363429ba1a13ebeb
commit + 7ff16e81163b3bee43ce053cb86fb2df2a023d53
blob - 79c0dcd42cb3eb108410077fba0e62a25889d724
blob + 10885f281ef4ce2b4adc3df97c06356ab074e227
--- src/ngircd/irc-login.c
+++ src/ngircd/irc-login.c
/* Nickname change */
/* Check that the user isn't on any channels set +N */
- chan = Channel_First();
- while (chan) {
- if(Channel_IsMemberOf(chan, Client) &&
- Channel_HasMode(chan, 'N') &&
- !Client_HasMode(Client, 'o'))
- return IRC_WriteErrClient(Client,
- ERR_NONICKCHANGE_MSG,
- Client_ID(Client),
- Channel_Name(chan));
- chan = Channel_Next(chan);
+ if(!Client_HasMode(Client, 'o')) {
+ chan = Channel_First();
+ while (chan) {
+ if(Channel_IsMemberOf(chan, Client) &&
+ Channel_HasMode(chan, 'N'))
+ return IRC_WriteErrClient(Client,
+ ERR_NONICKCHANGE_MSG,
+ Client_ID(Client),
+ Channel_Name(chan));
+ chan = Channel_Next(chan);
+ }
}
Change_Nick(Client, target, Req->argv[0],