From 22d2bfa33a2bee91a93552fc4f1721e16c49f63a Mon Sep 17 00:00:00 2001 From: Pekka Riikonen Date: Fri, 17 May 2002 14:26:41 +0000 Subject: [PATCH] updates. --- CHANGES | 6 ++++++ apps/silcd/server.c | 10 +++++----- apps/silcd/server_util.c | 32 +++++++++++++------------------- 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/CHANGES b/CHANGES index 133015d2..5bb1bf1f 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,9 @@ +Fri May 17 17:23:45 EEST 2002 Pekka Riikonen + + * Check the watcher list before sending signoff notifys + when closing client connection. Affected file is + silcd/server.c. + Fri May 17 08:33:41 CEST 2002 Pekka Riikonen * Fixed watcher list checking during server signoff. It diff --git a/apps/silcd/server.c b/apps/silcd/server.c index e8874aec..8eb36c88 100644 --- a/apps/silcd/server.c +++ b/apps/silcd/server.c @@ -2533,6 +2533,11 @@ void silc_server_free_client_data(SilcServer server, silc_server_packet_queue_purge(server, sock); if (client->id) { + /* Check if anyone is watching this nickname */ + if (server->server_type == SILC_ROUTER) + silc_server_check_watcher_list(server, client, NULL, + SILC_NOTIFY_TYPE_SIGNOFF); + /* Send SIGNOFF notify to routers. */ if (notify && !server->standalone && server->router) silc_server_send_notify_signoff(server, server->router->connection, @@ -2547,11 +2552,6 @@ void silc_server_free_client_data(SilcServer server, silc_server_remove_from_channels(server, NULL, client, FALSE, NULL, FALSE); - /* Check if anyone is watching this nickname */ - if (server->server_type == SILC_ROUTER) - silc_server_check_watcher_list(server, client, NULL, - SILC_NOTIFY_TYPE_SIGNOFF); - /* Remove this client from watcher list if it is */ silc_server_del_from_watcher_list(server, client); } diff --git a/apps/silcd/server_util.c b/apps/silcd/server_util.c index ea539913..890844ec 100644 --- a/apps/silcd/server_util.c +++ b/apps/silcd/server_util.c @@ -1018,7 +1018,7 @@ bool silc_server_check_cmode_rights(SilcServer server, if (is_op && is_fo) return TRUE; - /* Founder emplies operator */ + /* Founder implies operator */ if (is_fo) is_op = TRUE; @@ -1027,9 +1027,8 @@ bool silc_server_check_cmode_rights(SilcServer server, modes are available automatically for channel operator. */ if (mode & SILC_CHANNEL_MODE_PRIVKEY) { - if (!(channel->mode & SILC_CHANNEL_MODE_PRIVKEY)) - if (is_op && !is_fo) - return FALSE; + if (is_op && !is_fo) + return FALSE; } else { if (channel->mode & SILC_CHANNEL_MODE_PRIVKEY) { if (is_op && !is_fo) @@ -1038,9 +1037,8 @@ bool silc_server_check_cmode_rights(SilcServer server, } if (mode & SILC_CHANNEL_MODE_PASSPHRASE) { - if (!(channel->mode & SILC_CHANNEL_MODE_PASSPHRASE)) - if (is_op && !is_fo) - return FALSE; + if (is_op && !is_fo) + return FALSE; } else { if (channel->mode & SILC_CHANNEL_MODE_PASSPHRASE) { if (is_op && !is_fo) @@ -1049,9 +1047,8 @@ bool silc_server_check_cmode_rights(SilcServer server, } if (mode & SILC_CHANNEL_MODE_CIPHER) { - if (!(channel->mode & SILC_CHANNEL_MODE_CIPHER)) - if (is_op && !is_fo) - return FALSE; + if (is_op && !is_fo) + return FALSE; } else { if (channel->mode & SILC_CHANNEL_MODE_CIPHER) { if (is_op && !is_fo) @@ -1060,9 +1057,8 @@ bool silc_server_check_cmode_rights(SilcServer server, } if (mode & SILC_CHANNEL_MODE_FOUNDER_AUTH) { - if (!(channel->mode & SILC_CHANNEL_MODE_FOUNDER_AUTH)) - if (is_op && !is_fo) - return FALSE; + if (is_op && !is_fo) + return FALSE; } else { if (channel->mode & SILC_CHANNEL_MODE_FOUNDER_AUTH) { if (is_op && !is_fo) @@ -1071,9 +1067,8 @@ bool silc_server_check_cmode_rights(SilcServer server, } if (mode & SILC_CHANNEL_MODE_SILENCE_USERS) { - if (!(channel->mode & SILC_CHANNEL_MODE_SILENCE_USERS)) - if (is_op && !is_fo) - return FALSE; + if (is_op && !is_fo) + return FALSE; } else { if (channel->mode & SILC_CHANNEL_MODE_SILENCE_USERS) { if (is_op && !is_fo) @@ -1082,9 +1077,8 @@ bool silc_server_check_cmode_rights(SilcServer server, } if (mode & SILC_CHANNEL_MODE_SILENCE_OPERS) { - if (!(channel->mode & SILC_CHANNEL_MODE_SILENCE_OPERS)) - if (is_op && !is_fo) - return FALSE; + if (is_op && !is_fo) + return FALSE; } else { if (channel->mode & SILC_CHANNEL_MODE_SILENCE_OPERS) { if (is_op && !is_fo) -- 2.24.0