]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/irc-mode.c
Send "fake '*' key" in "MODE -k" replies
[ngircd-alex.git] / src / ngircd / irc-mode.c
index a29ed2387fe64b1274c9636ebee70724e9e10fb7..a59f085d7f6d4fb9434a07dc7266368bee0240b7 100644 (file)
@@ -582,9 +582,13 @@ Channel_Mode(CLIENT *Client, REQUEST *Req, CLIENT *Origin, CHANNEL *Channel)
                                goto chan_exit;
                        if (!set) {
                                if (is_oper || is_machine || is_owner ||
-                                   is_admin || is_op || is_halfop)
+                                   is_admin || is_op || is_halfop) {
                                        x[0] = *mode_ptr;
-                               else
+                                       if (Channel_HasMode(Channel, 'k'))
+                                               strlcpy(argadd, "*", sizeof(argadd));
+                                       if (arg_arg > mode_arg)
+                                               arg_arg++;
+                               } else
                                        connected = IRC_WriteErrClient(Origin,
                                                ERR_CHANOPRIVSNEEDED_MSG,
                                                Client_ID(Origin),