updates.
authorPekka Riikonen <priikone@silcnet.org>
Fri, 22 Jun 2001 12:34:34 +0000 (12:34 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Fri, 22 Jun 2001 12:34:34 +0000 (12:34 +0000)
CHANGES
TODO
apps/irssi/src/fe-common/silc/module-formats.c
apps/irssi/src/silc/core/silc-channels.c
apps/irssi/src/silc/core/silc-servers.c
lib/silcclient/command.c

diff --git a/CHANGES b/CHANGES
index 23e98f75082c9384a137f95a24ecc6412497dd04..6fa2681974661c0613bb4ea56917da303456bc0b 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -21,6 +21,12 @@ Fri Jun 22 10:44:14 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
          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 <priikone@poseidon.pspt.fi>
 
        * Fixed the silc_parse_command_line to remove extra spaces
diff --git a/TODO b/TODO
index 1e644afd6a9e209b8f8753b2f5bbf40336ce7910..e061b915c0fa48fd7158e1c657f97fcb1bd96f32 100644 (file)
--- 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
index 7e5c7df37dae4b7dcd3d738b80c0b9c6fa7e5504..b7545e3be5ef9e7e3b6e4e64d02e151e220466c0 100644 (file)
@@ -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 } },
index 82d6d08020b5dfc40417820aacc2e81611aaddde..cf3fc6ba055e6650eaabfb44e2b0bd99b106060a 100644 (file)
@@ -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,
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();
 }
index cd395be1dedfb6bb53545d766324783d92af6bb6..b73d7f268aedcb140a42bca3fc885a46cc059e0c 100644 (file)
@@ -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;