Fixed the invite process handling during joining to use silc.server.0.9.16
authorPekka Riikonen <priikone@silcnet.org>
Sat, 3 Jan 2004 10:19:47 +0000 (10:19 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Sat, 3 Jan 2004 10:19:47 +0000 (10:19 +0000)
        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
TODO
apps/silcd/command.c

diff --git a/CHANGES b/CHANGES
index 3e3d03ac8d6d7ac9348ce69ff41a4af167c71ba6..f4a9ad341d1b8746117e24a718b3c9f9c0d7b20e 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,11 @@
+Sat Jan  3 12:18:07 EET 2004  Pekka Riikonen <priikone@silcnet.org>
+
+       * 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 <priikone@silcnet.org>
 
        * Fixed the CUMODE channel founder authentication on normal
diff --git a/TODO b/TODO
index acf5e00f05c6a706fdac7c5cbb86bdc94134c8f7..830bd7361c977d52ecda8680457156ee26bcca2a 100644 (file)
--- 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
 
 
index 991116495bfd590fea991e3203fd98ee75ca188c..265dead7ea1509a5e1676dd8b5773a426dfd1a20 100644 (file)
@@ -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 ||