diff options
author | Timo Sirainen <cras@irssi.org> | 2001-02-17 19:44:22 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2001-02-17 19:44:22 +0000 |
commit | be6ba53fa47bc546279a2575523281845fe80da9 (patch) | |
tree | 2f08f6281cfbd38a1df2abe4fe69ccfd6f208f51 /src/irc/core/irc-servers-setup.c | |
parent | 513e140bcebce617d6078a9532ab9976437c3ef6 (diff) | |
download | irssi-be6ba53fa47bc546279a2575523281845fe80da9.zip |
Config file: ircnets -> chatnets, added type = "chat protocol" to
chatnet config. Moved reading chatnets to core. Lots of other
multiprotocol updates.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1237 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/irc/core/irc-servers-setup.c')
-rw-r--r-- | src/irc/core/irc-servers-setup.c | 37 |
1 files changed, 8 insertions, 29 deletions
diff --git a/src/irc/core/irc-servers-setup.c b/src/irc/core/irc-servers-setup.c index ec07420e..536ea310 100644 --- a/src/irc/core/irc-servers-setup.c +++ b/src/irc/core/irc-servers-setup.c @@ -45,23 +45,12 @@ static void sig_server_setup_fill_reconn(IRC_SERVER_CONNECT_REC *conn, conn->max_query_chans = sserver->max_query_chans; } -/* Create server connection record. `address' is required, rest can be NULL */ -static void sig_server_create_conn(SERVER_CONNECT_REC **conn, - IRC_CHATNET_REC *ircnet) +static void sig_server_setup_fill_connect(IRC_SERVER_CONNECT_REC *conn) { - IRC_SERVER_CONNECT_REC *rec; - - g_return_if_fail(conn != NULL); - - if (ircnet != NULL && !IS_IRCNET(ircnet)) + if (!IS_IRC_SERVER_CONNECT(conn)) return; - rec = g_new0(IRC_SERVER_CONNECT_REC, 1); - rec->chat_type = IRC_PROTOCOL; - rec->alternate_nick = g_strdup(settings_get_str("alternate_nick")); - - *conn = (SERVER_CONNECT_REC *) rec; - signal_stop(); + conn->alternate_nick = g_strdup(settings_get_str("alternate_nick")); } static void sig_server_setup_fill_chatnet(IRC_SERVER_CONNECT_REC *conn, @@ -140,27 +129,17 @@ static void init_userinfo(void) } } -static void sig_server_setup_read(SERVER_SETUP_REC **setuprec, - CONFIG_NODE *node, - IRC_CHATNET_REC *chatnet) +static void sig_server_setup_read(IRC_SERVER_SETUP_REC *rec, CONFIG_NODE *node) { - IRC_SERVER_SETUP_REC *rec; - - g_return_if_fail(setuprec != NULL); + g_return_if_fail(rec != NULL); g_return_if_fail(node != NULL); - if (chatnet != NULL && !IS_IRCNET(chatnet)) + if (!IS_IRC_SERVER_SETUP(rec)) return; - rec = g_new0(IRC_SERVER_SETUP_REC, 1); - rec->chat_type = IRC_PROTOCOL; - rec->max_cmds_at_once = config_node_get_int(node, "cmds_max_at_once", 0); rec->cmd_queue_speed = config_node_get_int(node, "cmd_queue_speed", 0); rec->max_query_chans = config_node_get_int(node, "max_query_chans", 0); - - *setuprec = (SERVER_SETUP_REC *) rec; - signal_stop(); } static void sig_server_setup_saved(IRC_SERVER_SETUP_REC *rec, @@ -184,7 +163,7 @@ void irc_servers_setup_init(void) init_userinfo(); signal_add("server setup fill reconn", (SIGNAL_FUNC) sig_server_setup_fill_reconn); - signal_add("server setup connect", (SIGNAL_FUNC) sig_server_create_conn); + signal_add("server setup fill connect", (SIGNAL_FUNC) sig_server_setup_fill_connect); signal_add("server setup fill chatnet", (SIGNAL_FUNC) sig_server_setup_fill_chatnet); signal_add("server setup read", (SIGNAL_FUNC) sig_server_setup_read); signal_add("server setup saved", (SIGNAL_FUNC) sig_server_setup_saved); @@ -193,7 +172,7 @@ void irc_servers_setup_init(void) void irc_servers_setup_deinit(void) { signal_remove("server setup fill reconn", (SIGNAL_FUNC) sig_server_setup_fill_reconn); - signal_remove("server setup connect", (SIGNAL_FUNC) sig_server_create_conn); + signal_remove("server setup fill connect", (SIGNAL_FUNC) sig_server_setup_fill_connect); signal_remove("server setup fill chatnet", (SIGNAL_FUNC) sig_server_setup_fill_chatnet); signal_remove("server setup read", (SIGNAL_FUNC) sig_server_setup_read); signal_remove("server setup saved", (SIGNAL_FUNC) sig_server_setup_saved); |