summaryrefslogtreecommitdiff
path: root/src/irc/core/ctcp.c
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2000-06-12 22:57:53 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2000-06-12 22:57:53 +0000
commit18f3c74d68e79f5962000770fca9e663bf1b1c23 (patch)
treef16183cc068553da6080a481a5c83c14c97b7bd5 /src/irc/core/ctcp.c
parent919abb2c6f8339e160a59b8ddcacfd403772379d (diff)
downloadirssi-18f3c74d68e79f5962000770fca9e663bf1b1c23.zip
CTCP msgs/replies stops the "event privmsg" or "event notice" signals now
so you don't have to check for them anymore (unless you use signal_add_first()..). /WINDOW MOVE command had some bugs. CTCP reply to some channel didn't display the channel name. Several code cleanups. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@327 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/irc/core/ctcp.c')
-rw-r--r--src/irc/core/ctcp.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/irc/core/ctcp.c b/src/irc/core/ctcp.c
index 31768088..067e9aef 100644
--- a/src/irc/core/ctcp.c
+++ b/src/irc/core/ctcp.c
@@ -156,6 +156,7 @@ static void event_privmsg(const char *data, IRC_SERVER_REC *server, const char *
if (ptr != NULL) *ptr = '\0';
signal_emit("ctcp msg", 5, msg, server, nick, addr, target);
+ signal_stop();
}
g_free(params);
@@ -167,7 +168,7 @@ static void event_notice(const char *data, IRC_SERVER_REC *server, const char *n
g_return_if_fail(data != NULL);
- params = event_get_params(data, 2, &target, &msg); /* Channel or nick name */
+ params = event_get_params(data, 2, &target, &msg);
/* handle only ctcp replies */
if (*msg == 1) {
@@ -175,6 +176,7 @@ static void event_notice(const char *data, IRC_SERVER_REC *server, const char *n
if (ptr != NULL) *ptr = '\0';
signal_emit("ctcp reply", 5, msg, server, nick, addr, target);
+ signal_stop();
}
g_free(params);
@@ -193,8 +195,8 @@ void ctcp_init(void)
settings_add_int("flood", "max_ctcp_queue", 5);
signal_add("server disconnected", (SIGNAL_FUNC) ctcp_deinit_server);
- signal_add("event privmsg", (SIGNAL_FUNC) event_privmsg);
- signal_add("event notice", (SIGNAL_FUNC) event_notice);
+ 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);
signal_add("ctcp reply", (SIGNAL_FUNC) ctcp_reply);
signal_add("ctcp msg ping", (SIGNAL_FUNC) ctcp_ping);