From e2eb538f0fa5941187f38c99a90cb7dcbaf66e92 Mon Sep 17 00:00:00 2001 From: Pekka Riikonen Date: Wed, 27 Jun 2001 19:36:31 +0000 Subject: [PATCH] updates. --- CHANGES | 10 ++++++++++ TODO | 10 +--------- apps/irssi/docs/help/in/ping.in | 4 ++-- apps/irssi/src/silc/core/silc-servers.c | 2 +- lib/silcclient/command.c | 18 +++++++++--------- 5 files changed, 23 insertions(+), 21 deletions(-) diff --git a/CHANGES b/CHANGES index 9ef4147d..fa9f1947 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,13 @@ +Wed Jun 27 22:24:47 EEST 2001 Pekka Riikonen + + * /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 * Fixed a fatal bug in private message sending and reception diff --git a/TODO b/TODO index 8f685e33..1e67a401 100644 --- 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. diff --git a/apps/irssi/docs/help/in/ping.in b/apps/irssi/docs/help/in/ping.in index 8cb62ba9..806e1b9b 100644 --- a/apps/irssi/docs/help/in/ping.in +++ b/apps/irssi/docs/help/in/ping.in @@ -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. + diff --git a/apps/irssi/src/silc/core/silc-servers.c b/apps/irssi/src/silc/core/silc-servers.c index d8085785..05c76845 100644 --- a/apps/irssi/src/silc/core/silc-servers.c +++ b/apps/irssi/src/silc/core/silc-servers.c @@ -277,7 +277,7 @@ char *silc_server_get_channels(SILC_SERVER_REC *server) /* SYNTAX: NICK */ /* SYNTAX: NOTICE */ /* SYNTAX: PART [] */ -/* SYNTAX: PING [] */ +/* SYNTAX: PING */ /* SYNTAX: SCONNECT [] */ /* SYNTAX: USERS */ diff --git a/lib/silcclient/command.c b/lib/silcclient/command.c index b73d7f26..da2e7b7d 100644 --- a/lib/silcclient/command.c +++ b/lib/silcclient/command.c @@ -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 [@] []"); - 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++; } -- 2.24.0