From ed0e989b25a2a6fb0a955cf76f4a2c70adf6eef9 Mon Sep 17 00:00:00 2001 From: Pekka Riikonen Date: Mon, 4 Nov 2002 14:03:58 +0000 Subject: [PATCH] Fixed the INVITE command to send the invite list in command reply. --- CHANGES | 7 ------- apps/irssi/docs/help/in/invite.in | 3 ++- apps/silcd/command.c | 20 +++++++------------- apps/silcd/idlist.c | 2 ++ 4 files changed, 11 insertions(+), 21 deletions(-) diff --git a/CHANGES b/CHANGES index e3273273..4ccc7360 100644 --- a/CHANGES +++ b/CHANGES @@ -6,13 +6,6 @@ Mon Nov 4 16:02:59 EET 2002 Pekka Riikonen * Fixed the INVITE command to send the invite list in command reply. Affected file silcd/command_reply.c. - * Fixed MOTD command reply sending. Affected file - silcd/command.c. - - * UTF-8 decode the topic in TOPIC command reply and LIST - command reply in Irssi SILC client. Affected file is - irssi/src/silc/core/client_ops.c. - Sun Nov 3 17:59:15 EET 2002 Pekka Riikonen * Fixed the INVITE command to not crash Irssi SILC client diff --git a/apps/irssi/docs/help/in/invite.in b/apps/irssi/docs/help/in/invite.in index 0767e619..7d11e262 100644 --- a/apps/irssi/docs/help/in/invite.in +++ b/apps/irssi/docs/help/in/invite.in @@ -6,7 +6,8 @@ the channel's invite list. Wildcards may be used with this command. Examples: /INVITE silc joe - Invites nickname `joe' to channel 'silc'. + Invites nickname `joe' to channel 'silc', and adds the client + to the channel's invite list. /INVITE silc +joe!*@* Adds nickname `joe' from anywhere to the invite list of the diff --git a/apps/silcd/command.c b/apps/silcd/command.c index ab4b5add..104f1140 100644 --- a/apps/silcd/command.c +++ b/apps/silcd/command.c @@ -1212,19 +1212,13 @@ SILC_SERVER_CMD_FUNC(invite) /* Send command reply */ tmp = silc_argument_get_arg_type(cmd->args, 1, &len); - if (add || del) - packet = - silc_command_reply_payload_encode_va(SILC_COMMAND_INVITE, - SILC_STATUS_OK, 0, ident, 2, - 2, tmp, len, - 3, channel->invite_list, - channel->invite_list ? - strlen(channel->invite_list) : 0); - else - packet = - silc_command_reply_payload_encode_va(SILC_COMMAND_INVITE, - SILC_STATUS_OK, 0, ident, 1, - 2, tmp, len); + packet = + silc_command_reply_payload_encode_va(SILC_COMMAND_INVITE, + SILC_STATUS_OK, 0, ident, 2, + 2, tmp, len, + 3, channel->invite_list, + channel->invite_list ? + strlen(channel->invite_list) : 0); silc_server_packet_send(server, cmd->sock, SILC_PACKET_COMMAND_REPLY, 0, packet->data, packet->len, FALSE); silc_buffer_free(packet); diff --git a/apps/silcd/idlist.c b/apps/silcd/idlist.c index ac025947..d683a0e9 100644 --- a/apps/silcd/idlist.c +++ b/apps/silcd/idlist.c @@ -671,6 +671,8 @@ int silc_idlist_del_channel(SilcIDList id_list, SilcChannelEntry entry) silc_free(entry->channel_name); silc_free(entry->id); silc_free(entry->topic); + silc_free(entry->invite_list); + silc_free(entry->ban_list); if (entry->channel_key) silc_cipher_free(entry->channel_key); if (entry->key) { -- 2.24.0