1
0
mirror of https://github.com/osmarks/ngircd.git synced 2024-12-12 01:40:27 +00:00

Channel mode setting: The local server is allowed to work on local channels

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."
This commit is contained in:
Alexander Barton 2022-12-26 17:32:59 +01:00
parent 46081d619a
commit 3e23f7d2c3

View File

@ -904,7 +904,7 @@ Channel_Mode(CLIENT *Client, REQUEST *Req, CLIENT *Origin, CHANNEL *Channel)
if (Client_Type(Client) == CLIENT_SERVER) { if (Client_Type(Client) == CLIENT_SERVER) {
/* MODE requests for local channels from other servers /* MODE requests for local channels from other servers
* are definitely invalid! */ * 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."); Log(LOG_ALERT, "Got remote MODE command for local channel!? Ignored.");
return CONNECTED; return CONNECTED;
} }