don't allow users to change their nick if the new nick is banned in a channel the...
[ircu2.10.12-pk.git] / ircd / s_user.c
index c10eb72360d8b152f0241489e197f3346f2bbb77..942c44c96a7b291db160290f3d67164bb82f014d 100644 (file)
@@ -667,7 +667,7 @@ int set_nick_name(struct Client* cptr, struct Client* sptr,
     if (MyUser(sptr)) {
       const char* channel_name;
       struct Membership *member;
-      if (!force && !IsXtraOp(sptr) && (channel_name = find_no_nickchange_channel(sptr))) {
+      if (!force && !IsXtraOp(sptr) && (channel_name = find_no_nickchange_channel(sptr, nick))) {
         return send_reply(cptr, ERR_BANNICKCHANGE, channel_name);
       }
       /*