updates.
authorPekka Riikonen <priikone@silcnet.org>
Thu, 29 Mar 2001 09:50:35 +0000 (09:50 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Thu, 29 Mar 2001 09:50:35 +0000 (09:50 +0000)
CHANGES
apps/silc/client_ops.c
apps/silc/local_command.c
lib/silcclient/command.c

diff --git a/CHANGES b/CHANGES
index d7dc9102a15ffbd7acfe73c426a6141ed73fbf59..d376b6a1564bc46372f3b3f72df880439a6b35cf 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,30 @@
+Thu Mar 29 15:26:25 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
+
+       * Implemented the RESTART command in the client.
+
+       * Added SILC_MESSAGE_FLAG_NOTICE message flag for informational
+         notice type messages.  Added notice printing to the user
+         interface.
+
+       * The channel keys are not re-generated if the channel's mode
+         is PRIVKEY, ie private key on the channel exists.  Affected
+         files silcd/server.c and silcd/command.c.
+
+       * Fixed a little bug in channel message delivery when channel
+         private keys are set in the server.  Affected file is
+         silcd/packet_send.c.
+
+       * Changed the setting on channel->on_channel = TRUE from the
+         silc_client_save_channel_key to the JOIN command reply.  The
+         key payload is not received if the private channel key is set.
+         Affected file lib/silcclient/command_reply.c and the
+         lib/silcclient/client_channel.c.
+
+       * When the CMODE_CHANGE notify is sent and the channel private
+         key mode is removed the channel key must be re-generated in
+         other cells as well.  Added this support for the router in the
+         silcd/packet_receive.c.
+
 Wed Mar 28 23:55:54 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
 
        * Added new local command ME to the client.  It is used to send
index c408656f6f582026c9577c7d8571853611236f4b..1a0947609fbc62bbde6a26dbd0fc3ee6874195ea 100644 (file)
@@ -55,6 +55,9 @@ void silc_channel_message(SilcClient client, SilcClientConnection conn,
     if (flags & SILC_MESSAGE_FLAG_ACTION)
       silc_print(client, "* %s %s", sender ? sender->nickname : "[<unknown>]", 
                 msg);
+    else if (flags & SILC_MESSAGE_FLAG_NOTICE)
+      silc_print(client, "-%s- %s", sender ? sender->nickname : "[<unknown>]", 
+                msg);
     else
       silc_print(client, "<%s> %s", sender ? sender->nickname : "[<unknown>]", 
                 msg);
@@ -63,6 +66,10 @@ void silc_channel_message(SilcClient client, SilcClientConnection conn,
       silc_print(client, "* %s:%s %s", sender ? sender->nickname : 
                 "[<unknown>]",
                 channel->channel_name, msg);
+    else if (flags & SILC_MESSAGE_FLAG_NOTICE)
+      silc_print(client, "-%s:%s- %s", sender ? sender->nickname : 
+                "[<unknown>]",
+                channel->channel_name, msg);
     else
       silc_print(client, "<%s:%s> %s", sender ? sender->nickname : 
                 "[<unknown>]",
index af7cba4b4fc53130d8801c4da4612a5f9e910bdb..b32f07f4da9aa802ec673a0b4353bb20a5b11a6e 100644 (file)
@@ -608,7 +608,7 @@ SILC_CLIENT_LCMD_FUNC(key)
       silc_say(client, conn, "Channel %s private keys", 
               channel_entry->channel_name);
       silc_say(client, conn, 
-              "  Cipher          Hmac            Key");
+              "  Cipher           Hmac             Key");
       for (k = 0; k < keys_count; k++) {
        memset(buf, 0, sizeof(buf));
        strncat(buf, "  ", 2);
index 7a6f3ea92259ac2f622a1f295c3d1f58216459ca..f5f2c875de692385beabd664cdfcf416171b3baf 100644 (file)
@@ -1694,8 +1694,33 @@ SILC_CLIENT_CMD_FUNC(connect)
   silc_client_command_free(cmd);
 }
 
+/* RESTART command. Restarts the server. You must be server operator
+   to be able to use this command. */
+
 SILC_CLIENT_CMD_FUNC(restart)
 {
+  SilcClientCommandContext cmd = (SilcClientCommandContext)context;
+  SilcClientConnection conn = cmd->conn;
+  SilcBuffer buffer;
+
+  if (!cmd->conn) {
+    SILC_NOT_CONNECTED(cmd->client, cmd->conn);
+    COMMAND_ERROR;
+    goto out;
+  }
+
+  buffer = silc_command_payload_encode(SILC_COMMAND_RESTART, 0,
+                                      NULL, NULL, NULL, 0);
+  silc_client_packet_send(cmd->client, cmd->conn->sock, SILC_PACKET_COMMAND, 
+                         NULL, 0, NULL, NULL, 
+                         buffer->data, buffer->len, TRUE);
+  silc_buffer_free(buffer);
+
+  /* Notify application */
+  COMMAND;
+
+ out:
+  silc_client_command_free(cmd);
 }
 
 /* CLOSE command. Close server connection to the remote server */
@@ -1768,7 +1793,7 @@ SILC_CLIENT_CMD_FUNC(shutdown)
  out:
   silc_client_command_free(cmd);
 }
+
 /* LEAVE command. Leaves a channel. Client removes itself from a channel. */
 
 SILC_CLIENT_CMD_FUNC(leave)