From ba6a44a19278217a94cbc0c1e99f6cf851f1199d Mon Sep 17 00:00:00 2001 From: Pekka Riikonen Date: Sat, 3 Jan 2004 10:19:47 +0000 Subject: [PATCH] Fixed the invite process handling during joining to use correct server name for the client that is matched against the invite string for the channel. Wrong server name caused inability to join the channel. --- CHANGES | 8 ++++++++ TODO | 3 --- apps/silcd/command.c | 8 +++++++- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/CHANGES b/CHANGES index 3e3d03ac..f4a9ad34 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,11 @@ +Sat Jan 3 12:18:07 EET 2004 Pekka Riikonen + + * Fixed the invite process handling during joining to use + correct server name for the client that is matched against + the invite string for the channel. Wrong server name caused + inability to join the channel. Affected file is + silcd/command.c. + Fri Jan 2 23:34:17 EET 2004 Pekka Riikonen * Fixed the CUMODE channel founder authentication on normal diff --git a/TODO b/TODO index acf5e00f..830bd736 100644 --- a/TODO +++ b/TODO @@ -15,9 +15,6 @@ TODO for SILC Server 1.0 o Check that founder key is distributed ok during backup resuming. - o invite (with @server!*@host) not working from normal server/backup - router? - o Testing diff --git a/apps/silcd/command.c b/apps/silcd/command.c index 99111649..265dead7 100644 --- a/apps/silcd/command.c +++ b/apps/silcd/command.c @@ -1965,7 +1965,10 @@ static void silc_server_command_join_channel(SilcServer server, if (!strchr(client->nickname, '@')) { silc_strncat(check2, sizeof(check2), "@", 1); silc_strncat(check2, sizeof(check2), - server->server_name, strlen(server->server_name)); + SILC_IS_LOCAL(client) ? server->server_name : + client->router->server_name, + SILC_IS_LOCAL(client) ? strlen(server->server_name) : + strlen(client->router->server_name)); } silc_strncat(check2, sizeof(check2), "!", 1); silc_strncat(check2, sizeof(check2), @@ -1976,6 +1979,9 @@ static void silc_server_command_join_channel(SilcServer server, cmd->sock->hostname, strlen(cmd->sock->hostname)); } + SILC_LOG_DEBUG(("check : %s", check)); + SILC_LOG_DEBUG(("check2: %s", check2)); + /* Check invite list if channel is invite-only channel */ if (channel->mode & SILC_CHANNEL_MODE_INVITE) { if (!channel->invite_list || -- 2.24.0