+Mon Jun 18 18:49:07 EEST 2001 Pekka Riikonen <priikone@poseidon.pspt.fi>
+
+ * Set SILC_MESSAGE_FLAG_NOREPLY when sending the away message.
+ Added check that if the NOREPLY is set then we will not send
+ the away message. This avoids infinite loop of away messages
+ if both clients are away. The affected file is
+ lib/silcclient/client_prvmsg.c.
+
+ * Fixed client crash if /NICK was given without arguments.
+ Affected file lib/silcclient/command.c.
+
+ * Server does not send the invite list in INVITE command back
+ to the client if the list was not altered. Added this notion
+ to the protocol spec as well. Affected file silcd/command.c.
+
+ Fixed possible crash in INVITE command by checking the
+ value of silc_server_get_client_route command.
+
+ * Fixed the INVITE notify type handling. The arguments are now
+ taken in correct order and client does not crash. The affected
+ file is irssi/src/silc/core/silc-channels.c.
+
+ Removed the "Inviting xxx to channel" message from the
+ client library away and let the application handle it.
+ Affected file lib/silcclient/command.c. Added that message
+ to Irssi SILC client's message formats.
+
+ * Fixed CMODE command crash in client. It now checks the
+ amount of arguments correctly and does not crash. The affected
+ file is lib/silcclient/command.c.
+
+ * Do not create new channel automatically in silc_channels_join
+ but check whether the channel by that name already exists.
+ Affected file irssi/silc/core/silc-channels.c.
+
Sun Jun 17 15:26:05 EEST 2001 Pekka Riikonen <priikone@poseidon.pspt.fi>
* Fixed the GETKEY command in the server to check also the
TODO/bugs in Irssi SILC client
==============================
- o If two clients are away and they send private message to each other
- it will cause infinite loop of sending away messages to each other.
-
- o /NICK without arguments crashes the client
-
- o /CMODE * +a without arguments crashes the client. Check other options
- with arguments as well.
-
- o /INVITE * nick crashes the remote client.
-
o Add PERL scripting support from Irssi CVS.
- o Add KNOCKOUT local command. It should kick an client from channel and
- set a ban for it for number of seconds.
-
- o Add KICKBAN local command. Kicks and bans the specified client.
-
o Add local commands to list the current server and client public keys
that the user has. And a local command to dump the contents of the
public key to the screen. Something like LISTKEYS, SHOWKEY...
- o Set different kind of settings, like, /set mutual_authentication,
- /set key_exchange_timeout, /set conn_auth_timeout etc etc.
+ o We should get rid of the clientconfig.[ch] in Irssi SILC and move the
+ cipher, hash, hmac and pkcs configuration to the Irssi SILC's config
+ file.
o Extend the /HELP command to support sub commands or something. So
that user can say /help set mutual_authentication they would get
help of the mutual_authentication setting.
+ o Set different kind of settings, like, /set mutual_authentication,
+ /set key_exchange_timeout, /set conn_auth_timeout etc etc.
+
+ o Add KNOCKOUT local command. It should kick an client from channel and
+ set a ban for it for number of seconds.
+
+ o Add KICKBAN local command. Kicks and bans the specified client.
+
o Do some /set show_mail_notification that would show a notification
on screen when new email is received.
- o We should get rid of the clientconfig.[ch] in Irssi SILC and move the
- cipher, hash, hmac and pkcs configuration to the Irssi SILC's config
- file.
-
TODO/bugs In SILC Client Library
================================
{ "no_invite_list", "channel {channel $0} invite list not set", 1, { 0 } },
{ "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 } },
/* WHOIS, WHOWAS and USERS (alias WHO) messages */
{ NULL, "Who Queries", 0 },
SILCTXT_CHANNEL_NO_INVITE_LIST,
SILCTXT_CHANNEL_BAN_LIST,
SILCTXT_CHANNEL_NO_BAN_LIST,
+ SILCTXT_CHANNEL_INVITING,
SILCTXT_FILL_2,
const char *channels, int automatic)
{
char **list, **tmp, *channel;
+ SILC_CHANNEL_REC *chanrec;
list = g_strsplit(channels, ",", -1);
for (tmp = list; *tmp != NULL; tmp++) {
channel = **tmp == '#' ? g_strdup(*tmp) :
g_strconcat("#", *tmp, NULL);
+
+ chanrec = silc_channel_find(server, channel);
+ if (chanrec) {
+ g_free(channel);
+ continue;
+ }
+
silc_channel_create(server, channel, FALSE);
silc_command_exec(server, "JOIN", channel);
g_free(channel);
{
SilcClientEntry client;
SilcChannelEntry channel;
+ char *channel_name;
- client = va_arg(va, SilcClientEntry);
channel = va_arg(va, SilcChannelEntry);
+ channel_name = va_arg(va, char *);
+ client = va_arg(va, SilcClientEntry);
- signal_emit("message invite", 4, server, channel->channel_name,
- client->nickname, client->username);
+ signal_emit("message invite", 4, server, channel ? channel->channel_name :
+ channel_name, client->nickname, client->username);
}
/*
/* Get route to the client */
dest_sock = silc_server_get_client_route(server, NULL, 0, dest_id, &idata);
+ if (!dest_sock) {
+ silc_server_command_send_status_reply(cmd, SILC_COMMAND_INVITE,
+ SILC_STATUS_ERR_NO_SUCH_CLIENT_ID);
+ goto out;
+ }
memset(invite, 0, sizeof(invite));
strncat(invite, dest->nickname, strlen(dest->nickname));
/* Send command reply */
tmp = silc_argument_get_arg_type(cmd->args, 1, &len);
- packet = silc_command_reply_payload_encode_va(SILC_COMMAND_INVITE,
- SILC_STATUS_OK, ident, 2,
- 2, tmp, len,
- 3, channel->invite_list,
- channel->invite_list ?
- strlen(channel->invite_list) :
- 0);
+
+ if (add || del)
+ packet =
+ silc_command_reply_payload_encode_va(SILC_COMMAND_INVITE,
+ SILC_STATUS_OK, 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, ident, 1,
+ 2, tmp, len);
silc_server_packet_send(server, cmd->sock, SILC_PACKET_COMMAND_REPLY, 0,
packet->data, packet->len, FALSE);
silc_buffer_free(packet);