]> arthur.barton.de Git - ngircd-alex.git/commitdiff
Allow channel admins to "de-admin" channel members
authorDNS777 <dns@rbose.org>
Sat, 6 Oct 2012 17:52:00 +0000 (19:52 +0200)
committerAlexander Barton <alex@barton.de>
Sat, 6 Oct 2012 17:52:15 +0000 (19:52 +0200)
This patch fixes unsetting of channel user mode "+a" (channel admin)
and adds a better error message: without this patch, a channel admin is
unable to unset this mode.

This closes bug #142.

src/ngircd/irc-mode.c

index 90f638d811219282b34af51c8cf8369e7548e4f7..04f50d77f8d3f5f832912f62dbd1b33211652ab5 100644 (file)
@@ -697,9 +697,9 @@ Channel_Mode(CLIENT *Client, REQUEST *Req, CLIENT *Origin, CHANNEL *Channel)
                /* --- Channel user modes --- */
                case 'q': /* Owner */
                case 'a': /* Channel admin */
-                       if(!is_oper && !is_machine && !is_owner) {
+                       if(!is_oper && !is_machine && !is_owner && !is_admin) {
                                connected = IRC_WriteStrClient(Origin,
-                                       ERR_CHANOPRIVSNEEDED_MSG,
+                                       ERR_CHANOPPRIVTOOLOW_MSG,
                                        Client_ID(Origin),
                                        Channel_Name(Channel));
                                goto chan_exit;