From: Pekka Riikonen Date: Sat, 3 Jan 2004 10:19:47 +0000 (+0000) Subject: Fixed the invite process handling during joining to use X-Git-Tag: silc.server.0.9.16 X-Git-Url: http://git.silcnet.org/gitweb/?p=silc.git;a=commitdiff_plain;h=ba6a44a19278217a94cbc0c1e99f6cf851f1199d;hp=444b93742ddb1f0759ed9315190060a2f45db73a 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. --- 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 ||