about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDNS777 <dns@rbose.org>2012-10-06 19:52:00 +0200
committerAlexander Barton <alex@barton.de>2012-10-06 19:52:15 +0200
commit23b07bdf50ef5cc7b57c057b6088e4f5e4d7d6da (patch)
treebbfa777dd795b9f06b4591d63aa817f53f1e637f
parent46b0eef721b9b3eec37d29aff65b6a7fc488a887 (diff)
downloadngircd-23b07bdf50ef5cc7b57c057b6088e4f5e4d7d6da.tar.gz
ngircd-23b07bdf50ef5cc7b57c057b6088e4f5e4d7d6da.zip
Allow channel admins to "de-admin" channel members
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.
-rw-r--r--src/ngircd/irc-mode.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ngircd/irc-mode.c b/src/ngircd/irc-mode.c
index 90f638d8..04f50d77 100644
--- a/src/ngircd/irc-mode.c
+++ b/src/ngircd/irc-mode.c
@@ -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;