From 63a7856091eaaaa598a7dd1ad32aba8b219c591b Mon Sep 17 00:00:00 2001 From: Pekka Riikonen Date: Thu, 29 Mar 2001 09:50:35 +0000 Subject: [PATCH] updates. --- CHANGES | 27 +++++++++++++++++++++++++++ apps/silc/client_ops.c | 7 +++++++ apps/silc/local_command.c | 2 +- lib/silcclient/command.c | 27 ++++++++++++++++++++++++++- 4 files changed, 61 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index d7dc9102..d376b6a1 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,30 @@ +Thu Mar 29 15:26:25 EEST 2001 Pekka Riikonen + + * 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 * Added new local command ME to the client. It is used to send diff --git a/apps/silc/client_ops.c b/apps/silc/client_ops.c index c408656f..1a094760 100644 --- a/apps/silc/client_ops.c +++ b/apps/silc/client_ops.c @@ -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 : "[]", msg); + else if (flags & SILC_MESSAGE_FLAG_NOTICE) + silc_print(client, "-%s- %s", sender ? sender->nickname : "[]", + msg); else silc_print(client, "<%s> %s", sender ? sender->nickname : "[]", msg); @@ -63,6 +66,10 @@ void silc_channel_message(SilcClient client, SilcClientConnection conn, silc_print(client, "* %s:%s %s", sender ? sender->nickname : "[]", channel->channel_name, msg); + else if (flags & SILC_MESSAGE_FLAG_NOTICE) + silc_print(client, "-%s:%s- %s", sender ? sender->nickname : + "[]", + channel->channel_name, msg); else silc_print(client, "<%s:%s> %s", sender ? sender->nickname : "[]", diff --git a/apps/silc/local_command.c b/apps/silc/local_command.c index af7cba4b..b32f07f4 100644 --- a/apps/silc/local_command.c +++ b/apps/silc/local_command.c @@ -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); diff --git a/lib/silcclient/command.c b/lib/silcclient/command.c index 7a6f3ea9..f5f2c875 100644 --- a/lib/silcclient/command.c +++ b/lib/silcclient/command.c @@ -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) -- 2.24.0