From: Pekka Riikonen Date: Fri, 22 Jun 2001 12:34:34 +0000 (+0000) Subject: updates. X-Git-Tag: robodoc-323~158 X-Git-Url: http://git.silcnet.org/gitweb/?p=silc.git;a=commitdiff_plain;h=8bedd95be03038c219f8a5ee9c7d0d02540c575c updates. --- diff --git a/CHANGES b/CHANGES index 23e98f75..6fa26819 100644 --- a/CHANGES +++ b/CHANGES @@ -21,6 +21,12 @@ Fri Jun 22 10:44:14 EEST 2001 Pekka Riikonen appear to be on the channel. The affected file is irssi/src/silc/core/silc-channels.c. + * Always update the conn->current_channel when executing command + on a channel. Affected file irssi/src/silc/core/silc-servers.c. + + * Fixed the KILL notify handling in Irssi SILC client to remove + the killed client on all channels. + Thu Jun 21 17:10:08 CEST 2001 Pekka Riikonen * Fixed the silc_parse_command_line to remove extra spaces diff --git a/TODO b/TODO index 1e644afd..e061b915 100644 --- a/TODO +++ b/TODO @@ -1,6 +1,10 @@ TODO/bugs in Irssi SILC client ============================== + o The CMODE notify handling in client library may return NULL + client entry pointer to the application (when server was the CMODE's + executor). Fix this somehow. + o Add PERL scripting support from Irssi CVS. o Add local commands to list the current server and client public keys diff --git a/apps/irssi/src/fe-common/silc/module-formats.c b/apps/irssi/src/fe-common/silc/module-formats.c index 7e5c7df3..b7545e3b 100644 --- a/apps/irssi/src/fe-common/silc/module-formats.c +++ b/apps/irssi/src/fe-common/silc/module-formats.c @@ -43,7 +43,7 @@ FORMAT_REC fecommon_silc_formats[] = { { "ban_list", "channel {channel $0} ban list: $1", 2, { 0, 0 } }, { "no_ban_list", "channel {channel $0} ban list not set", 1, { 0 } }, { "inviting", "Inviting {nick $0} to channel {channel $1}", 2, { 0, 0 } }, - { "kicked_you", "You have been kicked off channel {channel $0} ($1}", 2, { 0, 0 } }, + { "kicked_you", "You have been kicked off channel {channel $0} ($1)", 2, { 0, 0 } }, { "kicked", "{nick $0} has been kicked off channel {channel $1} ($2)", 3, { 0, 0, 0 } }, { "killed_you", "You have been killed from the SILC Network", 0 }, { "killed", "{nick $0} has been killed from the SILC Network ($1)", 2, { 0, 0 } }, diff --git a/apps/irssi/src/silc/core/silc-channels.c b/apps/irssi/src/silc/core/silc-channels.c index 82d6d080..cf3fc6ba 100644 --- a/apps/irssi/src/silc/core/silc-channels.c +++ b/apps/irssi/src/silc/core/silc-channels.c @@ -468,6 +468,14 @@ static void event_kill(SILC_SERVER_REC *server, va_list va) MSGLEVEL_CRAP, SILCTXT_CHANNEL_KILLED_YOU, tmp ? tmp : ""); } else { + GSList *nicks, *tmpn; + nicks = nicklist_get_same_unique(SERVER(server), client_entry); + for (tmpn = nicks; tmpn != NULL; tmpn = tmpn->next->next) { + CHANNEL_REC *channel = tmpn->data; + NICK_REC *nickrec = tmpn->next->data; + nicklist_remove(channel, nickrec); + } + printformat_module("fe-common/silc", server, NULL, MSGLEVEL_CRAP, SILCTXT_CHANNEL_KILLED, client_entry->nickname, diff --git a/apps/irssi/src/silc/core/silc-servers.c b/apps/irssi/src/silc/core/silc-servers.c index 070f6cb9..d8085785 100644 --- a/apps/irssi/src/silc/core/silc-servers.c +++ b/apps/irssi/src/silc/core/silc-servers.c @@ -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(); } diff --git a/lib/silcclient/command.c b/lib/silcclient/command.c index cd395be1..b73d7f26 100644 --- a/lib/silcclient/command.c +++ b/lib/silcclient/command.c @@ -793,20 +793,6 @@ SILC_CLIENT_CMD_FUNC(kill) silc_buffer_free(buffer); silc_buffer_free(idp); - /* Remove the client entry from the local cache. */ - silc_idcache_del_by_context(conn->client_cache, target); - if (target->nickname) - silc_free(target->nickname); - if (target->server) - silc_free(target->server); - if (target->id) - silc_free(target->id); - if (target->send_key) - silc_cipher_free(target->send_key); - if (target->receive_key) - silc_cipher_free(target->receive_key); - silc_free(target); - /* Notify application */ COMMAND;