updates.
authorPekka Riikonen <priikone@silcnet.org>
Wed, 27 Jun 2001 19:36:31 +0000 (19:36 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Wed, 27 Jun 2001 19:36:31 +0000 (19:36 +0000)
CHANGES
TODO
apps/irssi/docs/help/in/ping.in
apps/irssi/src/silc/core/silc-servers.c
lib/silcclient/command.c

diff --git a/CHANGES b/CHANGES
index 9ef4147d4525fdcc94d07f0e8f11cf7384321651..fa9f19479881b5934a29cc5535c06075f70d9062 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,13 @@
+Wed Jun 27 22:24:47 EEST 2001  Pekka Riikonen <priikone@silcnet.org>
+
+       * /WHOIS without arguments shows client's own information.
+         Affected file lib/silcclient/command.c.
+
+       * Changed PING to not accept any arguments.  The specs
+         says that client can ping only the connected server so
+         requiring an argument is not needed.  Affected file is
+         lib/silcclient/command.c.
+
 Wed Jun 27 00:10:33 EEST 2001  Pekka Riikonen <priikone@silcnet.org>
 
        * Fixed a fatal bug in private message sending and reception
diff --git a/TODO b/TODO
index 8f685e33b6e7c6f5cde56bb35814047e90033551..1e67a4019de2df7f2b50fb4b28e030c957da8258 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,15 +1,7 @@
 TODO/bugs in Irssi SILC client
 ==============================
 
- o /cmode #c +p says "not channel operator" even though is operator.
-
- o /WHOIS without arguments should so client's own info.
-
- o Do not let the Irssi show the passphrase of the channel on the screen.
-
- o Do not execute PING for invalid entities.
-
- o Do not let irssi u pdate the status bar on JOIN until the join command
+ o Do not let irssi update the status bar on JOIN until the join command
    is successful, so that it does not update that I'm on the channel
    even though I could not join the channel.
 
index 8cb62ba9741876e8cfe82ba96a1db88073cdfefd..806e1b9b71049b7aa2fbd8fcfcb1c60f569dcde9 100644 (file)
@@ -1,7 +1,7 @@
 
 @SYNTAX:ping@
 
-Sends PING to specified server.  If server is not provided
-the ping is sent to the current server.
+Sends PING to the connected server.
+
 
 
index d8085785adade075c7e8f48e13869d64f6dd75bb..05c76845519300b21dd251a7238e0b39036b8bf8 100644 (file)
@@ -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> */
 
index b73d7f268aedcb140a42bca3fc885a46cc059e0c..da2e7b7de8df58188d7d00531b9bb3a8917b5d1f 100644 (file)
@@ -244,10 +244,13 @@ SILC_CLIENT_CMD_FUNC(whois)
     goto out;
   }
 
-  if (cmd->argc < 2 || cmd->argc > 3) {
-    cmd->client->ops->say(cmd->client, conn, 
-            "Usage: /WHOIS <nickname>[@<server>] [<count>]");
-    COMMAND_ERROR;
+  /* Given without arguments fetches client's own information */
+  if (cmd->argc < 2) {
+    buffer = silc_id_payload_encode(cmd->conn->local_id, SILC_ID_CLIENT);
+    silc_client_send_command(cmd->client, cmd->conn, SILC_COMMAND_WHOIS, 
+                            ++conn->cmd_ident,
+                            1, 3, buffer->data, buffer->len);
+    silc_buffer_free(buffer);
     goto out;
   }
 
@@ -861,9 +864,6 @@ SILC_CLIENT_CMD_FUNC(ping)
     goto out;
   }
 
-  if (cmd->argc == 1 || !strcmp(cmd->argv[1], conn->remote_host))
-    name = strdup(conn->remote_host);
-
   /* Send the command */
   buffer = silc_command_payload_encode_va(SILC_COMMAND_PING, 0, 1, 
                                          1, conn->remote_id_data, 
@@ -886,7 +886,7 @@ SILC_CLIENT_CMD_FUNC(ping)
     if (conn->ping[i].dest_id == NULL) {
       conn->ping[i].start_time = time(NULL);
       conn->ping[i].dest_id = id;
-      conn->ping[i].dest_name = name;
+      conn->ping[i].dest_name = strdup(conn->remote_host);
       conn->ping_count++;
       break;
     }
@@ -896,7 +896,7 @@ SILC_CLIENT_CMD_FUNC(ping)
     conn->ping = silc_realloc(conn->ping, sizeof(*conn->ping) * (i + 1));
     conn->ping[i].start_time = time(NULL);
     conn->ping[i].dest_id = id;
-    conn->ping[i].dest_name = name;
+    conn->ping[i].dest_name = strdup(conn->remote_host);
     conn->ping_count++;
   }