]> arthur.barton.de Git - ngircd-alex.git/commitdiff
Channel mode setting: The local server is allowed to work on local channels
authorAlexander Barton <alex@barton.de>
Mon, 26 Dec 2022 16:32:59 +0000 (17:32 +0100)
committerAlexander Barton <alex@barton.de>
Mon, 26 Dec 2022 16:32:59 +0000 (17:32 +0100)
Don't forbid the local server to change modes on local channels: this
happens when overriding modes on local (&) channels in the server
configuration file, for example, and is perfectly fine.

Without this patch, the server worked as expected but showed critical
error messages for each local channel in its configuration file:

  "Got remote MODE command for local channel!? Ignored."

src/ngircd/irc-mode.c

index 7d3988529996c4e9811b8015b39a89fbaa7857cf..239dc1679bdb47e0eea7a7a033213cd8dd21f1c7 100644 (file)
@@ -904,7 +904,7 @@ Channel_Mode(CLIENT *Client, REQUEST *Req, CLIENT *Origin, CHANNEL *Channel)
                if (Client_Type(Client) == CLIENT_SERVER) {
                        /* MODE requests for local channels from other servers
                         * are definitely invalid! */
-                       if (Channel_IsLocal(Channel)) {
+                       if (Channel_IsLocal(Channel) && Client != Client_ThisServer()) {
                                Log(LOG_ALERT, "Got remote MODE command for local channel!? Ignored.");
                                return CONNECTED;
                        }