summaryrefslogtreecommitdiff
path: root/src/fe-common/irc/fe-irc-server.c
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2004-07-11 21:31:49 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2004-07-11 21:31:49 +0000
commitab3ba54ab438b2487fb5dfe169ef21975855974c (patch)
treef404ad2216a0a16f5fe1daea862bf254a90f77b4 /src/fe-common/irc/fe-irc-server.c
parentd9cc888daa56423c8630898df0e0d003337de066 (diff)
downloadirssi-ab3ba54ab438b2487fb5dfe169ef21975855974c.zip
s/ircnet/network/ - patch by Joost Vunderink
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3270 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-common/irc/fe-irc-server.c')
-rw-r--r--src/fe-common/irc/fe-irc-server.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/fe-common/irc/fe-irc-server.c b/src/fe-common/irc/fe-irc-server.c
index a07ff6d0..a9a3751a 100644
--- a/src/fe-common/irc/fe-irc-server.c
+++ b/src/fe-common/irc/fe-irc-server.c
@@ -52,16 +52,22 @@ const char *get_visible_target(IRC_SERVER_REC *server, const char *target)
}
/* SYNTAX: SERVER ADD [-4 | -6] [-ssl] [-ssl_cert <cert>] [-ssl_pkey <pkey>]
[-ssl_verify] [-ssl_cafile <cafile>] [-ssl_capath <capath>]
- [-auto | -noauto] [-ircnet <ircnet>] [-host <hostname>]
+ [-auto | -noauto] [-network <network>] [-host <hostname>]
[-cmdspeed <ms>] [-cmdmax <count>] [-port <port>]
<address> [<port> [<password>]] */
+/* NOTE: -network replaces the old -ircnet flag. */
static void sig_server_add_fill(IRC_SERVER_SETUP_REC *rec,
GHashTable *optlist)
{
IRC_CHATNET_REC *ircnet;
char *value;
- value = g_hash_table_lookup(optlist, "ircnet");
+ value = g_hash_table_lookup(optlist, "network");
+ /* For backwards compatibility, also allow the old name 'ircnet'.
+ But of course only if -network was not given. */
+ if (!value)
+ value = g_hash_table_lookup(optlist, "ircnet");
+
if (value != NULL) {
g_free_and_null(rec->chatnet);
if (*value != '\0') {
@@ -139,7 +145,7 @@ void fe_irc_server_init(void)
signal_add("server add fill", (SIGNAL_FUNC) sig_server_add_fill);
command_bind("server list", NULL, (SIGNAL_FUNC) cmd_server_list);
- command_set_options("server add", "-ircnet -cmdspeed -cmdmax -querychans");
+ command_set_options("server add", "-ircnet -network -cmdspeed -cmdmax -querychans");
}
void fe_irc_server_deinit(void)