about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlexander Barton <alex@barton.de>2011-08-01 23:30:55 +0200
committerAlexander Barton <alex@barton.de>2011-08-01 23:30:55 +0200
commit989c9fa531d83c9b1a302b222a4bcfeef767c2b6 (patch)
tree5e26d22134d17132f4ab3438e10868eb49092f76
parent2fd42667c2a064bab6e28523a7e68383604a1e15 (diff)
downloadngircd-989c9fa531d83c9b1a302b222a4bcfeef767c2b6.tar.gz
ngircd-989c9fa531d83c9b1a302b222a4bcfeef767c2b6.zip
Handle channel user modes 'a', 'h', and 'q' from remote servers
These channel user modes aren't used for anything at the moment, but
ngIRCd knows that these three modes are "channel user modes" and not
"channel modes", that is that these modes take an "nick name" argument.

Like unknown user and channel modes, these modes are saved and forwarded,
but ignored otherwise.
-rw-r--r--src/ngircd/irc-mode.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/ngircd/irc-mode.c b/src/ngircd/irc-mode.c
index 326c1046..3cceaeb8 100644
--- a/src/ngircd/irc-mode.c
+++ b/src/ngircd/irc-mode.c
@@ -594,6 +594,16 @@ Channel_Mode(CLIENT *Client, REQUEST *Req, CLIENT *Origin, CHANNEL *Channel)
 					Channel_Name(Channel));
 			break;
 		/* --- Channel user modes --- */
+		case 'a':
+		case 'h':
+		case 'q':
+			if (Client_Type(Client) != CLIENT_SERVER) {
+				connected = IRC_WriteStrClient(Origin,
+					ERR_CHANOPRIVSNEEDED_MSG,
+					Client_ID(Origin),
+					Channel_Name(Channel));
+				goto chan_exit;
+			}
 		case 'o': /* Channel operator */
 		case 'v': /* Voice */
 			if (arg_arg > mode_arg) {