updates.
[crypto.git] / apps / irssi / src / silc / core / silc-servers.c
index 070f6cb95c6549bb8bd49ba08148ca631e22f4d9..d8085785adade075c7e8f48e13869d64f6dd75bb 100644 (file)
@@ -323,13 +323,21 @@ void silc_command_exec(SILC_SERVER_REC *server,
 
 /* Generic command function to call any SILC command directly. */
 
-static void command_self(const char *data, SILC_SERVER_REC *server)
+static void command_self(const char *data, SILC_SERVER_REC *server,
+                        WI_ITEM_REC *item)
 {
   if (!IS_SILC_SERVER(server) || !server->connected) {
     printtext(NULL, NULL, MSGLEVEL_CLIENTERROR, "Not connected to server");
     return;
   }
 
+  if (IS_SILC_CHANNEL(item)) {
+    SILC_CHANNEL_REC *chanrec;
+    chanrec = silc_channel_find(server, item->name);
+    if (chanrec)
+      server->conn->current_channel = chanrec->entry;
+  }
+
   silc_command_exec(server, current_command, data);
   signal_stop();
 }