]> arthur.barton.de Git - ngircd-alex.git/commitdiff
Handle channel user modes 'a', 'h', and 'q' from remote servers ServerMode
authorAlexander Barton <alex@barton.de>
Mon, 1 Aug 2011 21:30:55 +0000 (23:30 +0200)
committerAlexander Barton <alex@barton.de>
Mon, 1 Aug 2011 21:30:55 +0000 (23:30 +0200)
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.

src/ngircd/irc-mode.c

index 326c1046f6d5f82597212ea4ae38f88bee104e82..3cceaeb898af3d90dd8df5b35daca4c438a00893 100644 (file)
@@ -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) {