+Tue May 29 22:16:40 EEST 2001 Pekka Riikonen <priikone@poseidon.pspt.fi>
+
+ * Added Makefile.defines_int to include the actual definitions
+ for Makefile.defines.in. Tested the new distribution system,
+ created distributions and tested installation.
+
+ * Added AWAY message printing to the Irssi SILC client. Added
+ the messages to the irssi/src/fe-common/silc/module-formats.[ch].
+
+ * Added SCONNECT command to call the SILC's CONNECT command.
+ Cannot use CONNECT directly since Irssi uses that internally.
+ Affected file irssi/src/silc/core/silc-servers.c.
+
+ Added ACTION local command. It is same as ME command but takes
+ the channel as mandatory argument.
+
+ Rewrote some of the Irssi's help files to suite for SILC
+ protocol.
+
Mon May 28 19:05:22 EEST 2001 Pekka Riikonen <priikone@poseidon.pspt.fi>
* Added Makefile.defines[.in] that should for now on be included
+TODO/bugs in Irssi SILC client
+==============================
+
+ 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.
+
+
TODO/bugs In SILC Client Library
================================
WN = "window new hide";
GOTO = "sb goto";
CHAT = "dcc chat";
+ ADMIN = "info";
};
settings = {
{ "pubkey_maybe_expired", "It is possible that the key has expired or changed", 0 },
{ "pubkey_mitm_attach", "It is also possible that someone is performing man-in-the-middle attack", 0 },
- /* Key management and key agreement */
+ /* Misc messages */
{ NULL, "Misc", 0 },
{ "server_oper", "You are now {hilight server operator}", 0 },
{ "ke_unknown_hmac", "Server does not support one of your proposed HMAC", 0 },
{ "ke_incorrect_signature", "Incorrect signature", 0 },
{ "auth_failed", "Authentication failed", 0 },
+ { "set_away", "You have meen marked as being away (away message: {hilight $0})", 1, { 0 } },
+ { "unset_away", "You are no longer marked as being away", 0 },
{ NULL, NULL, 0 }
};
SILCTXT_UNKNOWN_NOTIFY,
SILCTXT_KE_BAD_VERSION,
SILCTXT_KE_UNSUPPORTED_PUBLIC_KEY,
- SILCTXT_KE_UNKNOWN_PUBLIC_KEY,
SILCTXT_KE_UNKNOWN_GROUP,
SILCTXT_KE_UNKNOWN_CIPHER,
SILCTXT_KE_UNKNOWN_PKCS,
SILCTXT_KE_UNKNOWN_HMAC,
SILCTXT_KE_INCORRECT_SIGNATURE,
SILCTXT_AUTH_FAILED,
+ SILCTXT_SET_AWAY,
+ SILCTXT_UNSET_AWAY,
};
extern FORMAT_REC fecommon_silc_formats[];
silc_free(argv_types);
}
+/* ACTION local command. Same as ME but takes the channel as mandatory
+ argument. */
+
+static void command_action(const char *data, SILC_SERVER_REC *server,
+ WI_ITEM_REC *item)
+{
+ SILC_CHANNEL_REC *chanrec;
+ char *tmpcmd = "ME", *tmp;
+ uint32 argc = 0;
+ unsigned char **argv;
+ uint32 *argv_lens, *argv_types;
+ int i;
+
+ if (!IS_SILC_SERVER(server) || !server->connected)
+ cmd_return_error(CMDERR_NOT_CONNECTED);
+
+ if (!IS_SILC_CHANNEL(item))
+ cmd_return_error(CMDERR_NOT_JOINED);
+
+ /* Now parse all arguments */
+ tmp = g_strconcat(tmpcmd, " ", data, NULL);
+ silc_parse_command_line(tmp, &argv, &argv_lens,
+ &argv_types, &argc, 3);
+ g_free(tmp);
+
+ if (argc < 3)
+ cmd_return_error(CMDERR_NOT_ENOUGH_PARAMS);
+
+ chanrec = silc_channel_find(server, argv[1]);
+ if (chanrec == NULL)
+ cmd_return_error(CMDERR_CHAN_NOT_FOUND);
+
+ /* Send the action message */
+ silc_client_send_channel_message(silc_client, server->conn,
+ chanrec->entry, NULL,
+ SILC_MESSAGE_FLAG_ACTION,
+ argv[2], argv_lens[2], TRUE);
+
+ printformat_module("fe-common/silc", server, chanrec->entry->channel_name,
+ MSGLEVEL_ACTIONS, SILCTXT_CHANNEL_OWNACTION, argv[2]);
+
+ for (i = 0; i < argc; i++)
+ silc_free(argv[i]);
+ silc_free(argv_lens);
+ silc_free(argv_types);
+}
+
/* NOTICE local command. */
static void command_notice(const char *data, SILC_SERVER_REC *server,
/* Remove any possible away message */
silc_client_set_away_message(silc_client, server->conn, NULL);
set = FALSE;
+
+ printformat_module("fe-common/silc", server, NULL, MSGLEVEL_CRAP,
+ SILCTXT_UNSET_AWAY);
} else {
/* Set the away message */
silc_client_set_away_message(silc_client, server->conn, (char *)data);
set = TRUE;
+
+ printformat_module("fe-common/silc", server, NULL, MSGLEVEL_CRAP,
+ SILCTXT_SET_AWAY, data);
}
+ signal_emit("away mode changed", 1, server);
+
silc_command_exec(server, "UMODE", set ? "+g" : "-g");
}
command_bind("part", MODULE_NAME, (SIGNAL_FUNC) command_part);
command_bind("me", MODULE_NAME, (SIGNAL_FUNC) command_me);
+ command_bind("action", MODULE_NAME, (SIGNAL_FUNC) command_action);
command_bind("notice", MODULE_NAME, (SIGNAL_FUNC) command_notice);
command_bind("away", MODULE_NAME, (SIGNAL_FUNC) command_away);
command_bind("key", MODULE_NAME, (SIGNAL_FUNC) command_key);
command_unbind("part", (SIGNAL_FUNC) command_part);
command_unbind("me", (SIGNAL_FUNC) command_me);
+ command_unbind("action", (SIGNAL_FUNC) command_action);
command_unbind("notice", (SIGNAL_FUNC) command_notice);
command_unbind("away", (SIGNAL_FUNC) command_away);
command_unbind("key", (SIGNAL_FUNC) command_key);
(*cmd->cb)(ctx);
}
+/* Generic command function to call any SILC command directly. */
+
static void command_self(const char *data, SILC_SERVER_REC *server)
{
if (!IS_SILC_SERVER(server) || !server->connected) {
signal_stop();
}
+/* SCONNECT command. Calls actually SILC's CONNECT command since Irssi
+ has CONNECT command for other purposes. */
+
+static void command_sconnect(const char *data, SILC_SERVER_REC *server)
+{
+ if (!IS_SILC_SERVER(server) || !server->connected) {
+ printtext(NULL, NULL, MSGLEVEL_CLIENTERROR, "Not connected to server");
+ return;
+ }
+
+ silc_command_exec(server, "CONNECT", data);
+ signal_stop();
+}
+
static void event_text(const char *line, SILC_SERVER_REC *server,
WI_ITEM_REC *item)
{
command_bind("kill", MODULE_NAME, (SIGNAL_FUNC) command_self);
command_bind("kick", MODULE_NAME, (SIGNAL_FUNC) command_self);
command_bind("info", MODULE_NAME, (SIGNAL_FUNC) command_self);
- command_bind("connect", MODULE_NAME, (SIGNAL_FUNC) command_self);
command_bind("ping", MODULE_NAME, (SIGNAL_FUNC) command_self);
command_bind("motd", MODULE_NAME, (SIGNAL_FUNC) command_self);
command_bind("close", MODULE_NAME, (SIGNAL_FUNC) command_self);
command_bind("shutdown", MODULE_NAME, (SIGNAL_FUNC) command_self);
command_bind("getkey", MODULE_NAME, (SIGNAL_FUNC) command_self);
+ command_bind("sconnect", MODULE_NAME, (SIGNAL_FUNC) command_sconnect);
command_set_options("connect", "+silcnet");
}
command_unbind("kill", (SIGNAL_FUNC) command_self);
command_unbind("kick", (SIGNAL_FUNC) command_self);
command_unbind("info", (SIGNAL_FUNC) command_self);
- command_unbind("connect", (SIGNAL_FUNC) command_self);
command_unbind("ping", (SIGNAL_FUNC) command_self);
command_unbind("motd", (SIGNAL_FUNC) command_self);
command_unbind("ban", (SIGNAL_FUNC) command_self);
command_unbind("close", (SIGNAL_FUNC) command_self);
command_unbind("shutdown", (SIGNAL_FUNC) command_self);
command_unbind("getkey", (SIGNAL_FUNC) command_self);
+ command_unbind("sconnect", (SIGNAL_FUNC) command_sconnect);
}
-#
-# Configured ciphers.
-#
-# Format: <name>:<module path>:<key length>:<block length>
-#
-# If the cipher is builtin the <module path> maybe omitted.
-#
-[cipher]
+[Cipher]
aes-256-cbc:../lib/silcsim/modules/aes.sim.so:32:16
aes-192-cbc:../lib/silcsim/modules/aes.sim.so:24:16
aes-128-cbc:../lib/silcsim/modules/aes.sim.so:16:16
mars-128-cbc:../lib/silcsim/modules/mars.sim.so:16:16
none:../lib/silcsim/modules/none.sim.so:0:0
-#
-# Configured hash functions.
-#
-# Format: <name>:<module path>:<block length>:<digest length>
-#
-# If the hash function is builtin the <module path> maybe omitted.
-#
-[hash]
+[Hash]
md5::64:16
sha1::64:20
-#
-# Configured HMAC functions. The hash function used in the HMAC must
-# configured to the [hash] section.
-#
-# Format: <name>:<hash name>:<mac length>
-#
[hmac]
hmac-sha1-96:sha1:12
hmac-md5-96:md5:12
-hmac-sha1:sha1:20
+hmac-sha1:sha1:20
hmac-md5:md5:16
-#
-# Configured PKCS.
-#
-# Format: <name>:<module path>:<key length>
-#
-# NOTE: <module path> must be omitted as PKCS cannot be modules currently.
-#
-[pkcs]
+[PKCS]
rsa
-#
-# Configured connections to servers.
-#
-# Format: <remote host>:<auth type>:<auth data>:<port>
-#
-# <auth type> maybe `passwd' or `pubkey'.
-#
-[connection]
-#lassi.kuo.fi.ssh.com:passwd::706
+[ServerKeys]
+./silcd.pub:./silcd.prv
-#
-# Commands. These are executed when SILC client is run. Normal
-# SILC commands may be executed here.
-#
-# Format: <command>
-#
-[commands]
+[Identity]
+nobody:nobody
+
+[AdminInfo]
+Mun huone:Mun servo:Pekka Riikonen:priikone@poseidon.pspt.fi
+
+[ServerInfo]
+lassi.kuo.fi.ssh.com:212.146.42.253:Kuopio, Finland:1333
+
+[ListenPort]
+212.146.42.253:212.146.42.253:1333
+
+[Logging]
+infologfile:silcd2.log:10000
+#warninglogfile:/var/log/silcd_warning.log:10000
+errorlogfile:silcd2.log:10000
+#fatallogfile:/var/log/silcd_error.log:
+
+[ConnectionClass]
+1:100:100:100
+2:200:300:400
+
+[ClientConnection]
+:::1333:1
+:::1334:1
+:::1335:1
+:::1336:1
+
+[AdminConnection]
+*:priikone:*:passwd:testi
+
+[ServerConnection]
+#212.146.42.253:passwd:priikone:1335:1:1
+
+[RouterConnection]
+212.146.42.253:passwd:priikone:1334:1:1:1
+
+[DenyConnection]
-[cipher]
-twofish:/home/silc/silc/lib/silcsim/modules/twofish.sim.so:16:16
-rc6:/home/silc/silc/lib/silcsim/modules/rc6.sim.so:16:16
-mars:/home/silc/silc/lib/silcsim/modules/mars.sim.so:16:16
-none:/home/silc/silc/lib/silcsim/modules/none.sim.so:0:0
+[Cipher]
+aes-256-cbc:../lib/silcsim/modules/aes.sim.so:32:16
+aes-192-cbc:../lib/silcsim/modules/aes.sim.so:24:16
+aes-128-cbc:../lib/silcsim/modules/aes.sim.so:16:16
+twofish-256-cbc:../lib/silcsim/modules/twofish.sim.so:32:16
+twofish-192-cbc:../lib/silcsim/modules/twofish.sim.so:24:16
+twofish-128-cbc:../lib/silcsim/modules/twofish.sim.so:16:16
+mars-256-cbc:../lib/silcsim/modules/mars.sim.so:32:16
+mars-192-cbc:../lib/silcsim/modules/mars.sim.so:24:16
+mars-128-cbc:../lib/silcsim/modules/mars.sim.so:16:16
+none:../lib/silcsim/modules/none.sim.so:0:0
-[hash]
+[Hash]
md5::64:16
sha1::64:20
[hmac]
hmac-sha1-96:sha1:12
hmac-md5-96:md5:12
-hmac-sha1:sha1:20
+hmac-sha1:sha1:20
hmac-md5:md5:16
-#[pkcs]
-#rsa::1024
-#dss::1024
+[PKCS]
+rsa
-[connection]
-#lassi.kuo.fi.ssh.com:passwd::1333
+[serverkeys]
+./silcd.pub:./silcd.prv
-[commands]
-#/server lassi:1333
-#/server lassi:1334
-#/server leevi:1333
+[Identity]
+nobody:nobody
+
+[AdminInfo]
+Mun huone:Mun servo:Pekka Riikonen:priikone@poseidon.pspt.fi
+
+[ServerInfo]
+lassi.kuo.fi.ssh.com:212.146.42.253:Kuopio, Finland:1334
+
+[ListenPort]
+212.146.42.253:212.146.42.253:1334
+
+[Logging]
+infologfile:silcd2.log:10000
+#warninglogfile:/var/log/silcd_warning.log:10000
+errorlogfile:silcd2.log:10000
+#fatallogfile:/var/log/silcd_error.log:
+
+[ConnectionClass]
+1:100:100:100
+2:200:300:400
+
+[ClientConnection]
+:::1333:1
+:::1334:1
+:::1335:1
+:::1336:1
+
+[AdminConnection]
+*:priikone:*:passwd:testi
+
+[ServerConnection]
+212.146.42.253:passwd:priikone:1334:1:1
+
+[RouterConnection]
+212.146.42.253:passwd:priikone:1335:1:1:0
+
+[DenyConnection]