diff options
author | Timo Sirainen <cras@irssi.org> | 2001-12-06 23:29:48 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2001-12-06 23:29:48 +0000 |
commit | 4c6237256f026def4221615bf04c9ec97cee15bb (patch) | |
tree | 65b3d378aca1d68d854148af23a96da52e8741a3 /src/fe-common | |
parent | be8778052e5932c3d0b4b021ce00997b1f5f9880 (diff) | |
download | irssi-4c6237256f026def4221615bf04c9ec97cee15bb.zip |
/IRCNET ADD -usermode option added.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2206 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-common')
-rw-r--r-- | src/fe-common/irc/fe-ircnet.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/fe-common/irc/fe-ircnet.c b/src/fe-common/irc/fe-ircnet.c index 3f84e98e..850117c4 100644 --- a/src/fe-common/irc/fe-ircnet.c +++ b/src/fe-common/irc/fe-ircnet.c @@ -54,6 +54,8 @@ static void cmd_ircnet_list(void) g_string_sprintfa(str, "host: %s, ", rec->own_host); if (rec->autosendcmd != NULL) g_string_sprintfa(str, "autosendcmd: %s, ", rec->autosendcmd); + if (rec->usermode != NULL) + g_string_sprintfa(str, "usermode: %s, ", rec->usermode); if (rec->cmd_queue_speed > 0) g_string_sprintfa(str, "cmdspeed: %d, ", rec->cmd_queue_speed); @@ -108,6 +110,7 @@ static void cmd_ircnet_add(const char *data) g_free_and_null(rec->own_host); rec->own_ip4 = rec->own_ip6 = NULL; } + if (g_hash_table_lookup(optlist, "usermode")) g_free_and_null(rec->usermode); if (g_hash_table_lookup(optlist, "autosendcmd")) g_free_and_null(rec->autosendcmd); } @@ -140,6 +143,8 @@ static void cmd_ircnet_add(const char *data) rec->own_ip4 = rec->own_ip6 = NULL; } + value = g_hash_table_lookup(optlist, "usermode"); + if (value != NULL && *value != '\0') rec->usermode = g_strdup(value); value = g_hash_table_lookup(optlist, "autosendcmd"); if (value != NULL && *value != '\0') rec->autosendcmd = g_strdup(value); @@ -180,7 +185,7 @@ void fe_ircnet_init(void) command_bind("ircnet add", NULL, (SIGNAL_FUNC) cmd_ircnet_add); command_bind("ircnet remove", NULL, (SIGNAL_FUNC) cmd_ircnet_remove); - command_set_options("ircnet add", "-kicks -msgs -modes -whois -cmdspeed -cmdmax -nick -user -realname -host -autosendcmd -querychans"); + command_set_options("ircnet add", "-kicks -msgs -modes -whois -cmdspeed -cmdmax -nick -user -realname -host -autosendcmd -querychans -usermode"); } void fe_ircnet_deinit(void) |