summaryrefslogtreecommitdiff
path: root/src/core/chat-commands.c
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2001-02-19 02:50:08 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2001-02-19 02:50:08 +0000
commit1117638b52458f8e80f7ade066989c45eb74f0f9 (patch)
tree29e316b2fcc417114f915001252e4959c39993bf /src/core/chat-commands.c
parent42634d83bc5a168ddcacf90a18d2180a30e12b6d (diff)
downloadirssi-1117638b52458f8e80f7ade066989c45eb74f0f9.zip
Moved autoconnects and command line parameter parsing from irc to core.
Added not_initialized parameter to chat protocols that are created using chat_protocol_get_unknown(). /CONNECT doesn't crash now with non-initialized protocols but instead complains about them. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1248 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/core/chat-commands.c')
-rw-r--r--src/core/chat-commands.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/core/chat-commands.c b/src/core/chat-commands.c
index a22e24d2..5e0be456 100644
--- a/src/core/chat-commands.c
+++ b/src/core/chat-commands.c
@@ -66,6 +66,14 @@ static SERVER_CONNECT_REC *get_server_connect(const char *data, int *plus_addr)
if (proto == NULL)
proto = chat_protocol_find_id(conn->chat_type);
+ if (proto->not_initialized) {
+ /* trying to use protocol that isn't yet initialized */
+ signal_emit("chat protocol unknown", 1, proto->name);
+ server_connect_free(conn);
+ cmd_params_free(free_arg);
+ return NULL;
+ }
+
if (g_hash_table_lookup(optlist, "6") != NULL)
conn->family = AF_INET6;
else if (g_hash_table_lookup(optlist, "4") != NULL)