X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fngircd%2Fchannel.c;fp=src%2Fngircd%2Fchannel.c;h=c679daeb9a08cbee79ae2cd48150318959cf8c08;hb=d3ae351236e605b400b94fcfa8e7670e26e19c89;hp=10b05405b5ad50b0ebb464d1c9ce5139fc4d12ae;hpb=4790d78c980c79abfd71c064be1eb085717210f8;p=ngircd-alex.git diff --git a/src/ngircd/channel.c b/src/ngircd/channel.c index 10b05405..c679daeb 100644 --- a/src/ngircd/channel.c +++ b/src/ngircd/channel.c @@ -327,6 +327,17 @@ Channel_Kick(CLIENT *Peer, CLIENT *Target, CLIENT *Origin, const char *Name, } if(Client_Type(Peer) == CLIENT_USER) { + /* Channel mode 'Q' and user mode 'q' on target: nobody but + * IRC Operators and servers can kick the target user */ + if ((strchr(Channel_Modes(chan), 'Q') + || Client_HasMode(Target, 'q')) + && !Client_HasMode(Origin, 'o')) { + IRC_WriteStrClient(Origin, ERR_KICKDENY_MSG, + Client_ID(Origin), Name, + Client_ID(Target)); + return; + } + /* Check if client has the rights to kick target */ ptr = Channel_UserModes(chan, Peer); target_modes = Channel_UserModes(chan, Target);