diff options
author | Timo Sirainen <cras@irssi.org> | 2000-07-30 17:19:16 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2000-07-30 17:19:16 +0000 |
commit | 87a8f713443283600bf9f66e1f8a73c54284ab3a (patch) | |
tree | a5f7afb793649f8db7433f34bd619d09305da8c5 /src/irc/core/ctcp.c | |
parent | 05cfbaf9d5b08f77adadf6d955c04f76c348aae7 (diff) | |
download | irssi-87a8f713443283600bf9f66e1f8a73c54284ab3a.zip |
Bugfixes for non-irc server handling.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@550 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/irc/core/ctcp.c')
-rw-r--r-- | src/irc/core/ctcp.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/irc/core/ctcp.c b/src/irc/core/ctcp.c index 7daee3d9..c3173cb7 100644 --- a/src/irc/core/ctcp.c +++ b/src/irc/core/ctcp.c @@ -182,10 +182,13 @@ static void event_notice(const char *data, IRC_SERVER_REC *server, const char *n g_free(params); } -static void ctcp_deinit_server(IRC_SERVER_REC *server) +static void sig_disconnected(IRC_SERVER_REC *server) { g_return_if_fail(server != NULL); + if (!irc_server_check(server)) + return; + g_slist_free(server->ctcpqueue); } @@ -194,7 +197,7 @@ void ctcp_init(void) settings_add_str("misc", "ctcp_version_reply", PACKAGE" v$J - running on $sysname"); settings_add_int("flood", "max_ctcp_queue", 5); - signal_add("server disconnected", (SIGNAL_FUNC) ctcp_deinit_server); + signal_add("server disconnected", (SIGNAL_FUNC) sig_disconnected); signal_add_first("event privmsg", (SIGNAL_FUNC) event_privmsg); signal_add_first("event notice", (SIGNAL_FUNC) event_notice); signal_add("ctcp msg", (SIGNAL_FUNC) ctcp_msg); @@ -206,7 +209,7 @@ void ctcp_init(void) void ctcp_deinit(void) { - signal_remove("server disconnected", (SIGNAL_FUNC) ctcp_deinit_server); + signal_remove("server disconnected", (SIGNAL_FUNC) sig_disconnected); signal_remove("event privmsg", (SIGNAL_FUNC) event_privmsg); signal_remove("event notice", (SIGNAL_FUNC) event_notice); signal_remove("ctcp msg", (SIGNAL_FUNC) ctcp_msg); |