updates.
[silc.git] / apps / irssi / src / silc / core / silc-servers.c
index 070f6cb95c6549bb8bd49ba08148ca631e22f4d9..a810b8eed7bc4475c31e2e76fd73c169ef271045 100644 (file)
@@ -253,16 +253,16 @@ char *silc_server_get_channels(SILC_SERVER_REC *server)
 /* SYNTAX: BAN <channel> [+|-[<nickname>[@<server>[!<username>[@hostname>]]]]] */
 /* SYNTAX: CMODE <channel> +|-<modes> [{ <arguments>}] */
 /* SYNTAX: CUMODE <channel> +|-<modes> <nickname>[@<server>] [-pubkey|<passwd>] */
-/* SYNTAX: GETKEY <nickname> */
+/* SYNTAX: GETKEY <nickname or server name> */
 /* SYNTAX: INVITE <channel> [<nickname>[@server>] */
 /* SYNTAX: INVITE <channel> [+|-[<nickname>[@<server>[!<username>[@hostname>]]]]] */
 /* SYNTAX: KEY MSG <nickname> set|unset|list|agreement|negotiate [<arguments>] */
 /* SYNTAX: KEY CHANNEL <channel> set|unset|list|agreement|negotiate [<arguments>] */
 /* SYNTAX: KICK <channel> <nickname>[@<server>] [<comment>] */
 /* SYNTAX: KILL <channel> <nickname>[@<server>] [<comment>] */
-/* SYNTAX: OPER <username> [<public key>] */
-/* SYNTAX: SILCOPER <username> [<public key>] */
-/* SYNTAX: TOPIC <channel> [<topic> */
+/* SYNTAX: OPER <username> [-pubkey] */
+/* SYNTAX: SILCOPER <username> [-pubkey] */
+/* SYNTAX: TOPIC <channel> [<topic>] */
 /* SYNTAX: UMODE +|-<modes> */
 /* SYNTAX: WHOIS <nickname>[@<server>] [<count>] */
 /* SYNTAX: WHOWAS <nickname>[@<server>] [<count>] */
@@ -277,7 +277,7 @@ char *silc_server_get_channels(SILC_SERVER_REC *server)
 /* SYNTAX: NICK <nickname> */
 /* SYNTAX: NOTICE <message> */
 /* SYNTAX: PART [<channel>] */
-/* SYNTAX: PING [<server>] */
+/* SYNTAX: PING */
 /* SYNTAX: SCONNECT <server> [<port>] */
 /* SYNTAX: USERS <channel> */
 
@@ -318,18 +318,26 @@ void silc_command_exec(SILC_SERVER_REC *server,
   ctx->argv_types = argv_types;
   
   /* Execute command */
-  (*cmd->cb)(ctx);
+  (*cmd->cb)(ctx, NULL);
 }
 
 /* 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();
 }