summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2001-12-10 00:38:12 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2001-12-10 00:38:12 +0000
commit45bb286d59a88dc90387f14325347589ca8a117b (patch)
tree347d367cfd770d0e0b43acaa4ce5f8d88831f5b2 /src
parent83adc0016070ad01d36a6a0f6c81ff5137d16346 (diff)
downloadirssi-45bb286d59a88dc90387f14325347589ca8a117b.zip
307 line is used for /USERIP in undernet. Also changed some other alternative
reply handlers to call event_received() instead of print it itself. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2230 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src')
-rw-r--r--src/fe-common/irc/fe-events-numeric.c34
1 files changed, 16 insertions, 18 deletions
diff --git a/src/fe-common/irc/fe-events-numeric.c b/src/fe-common/irc/fe-events-numeric.c
index 90514138..317a4526 100644
--- a/src/fe-common/irc/fe-events-numeric.c
+++ b/src/fe-common/irc/fe-events-numeric.c
@@ -399,13 +399,18 @@ static void event_whois_oper(IRC_SERVER_REC *server, const char *data)
static void event_whois_registered(IRC_SERVER_REC *server, const char *data)
{
- char *params, *nick;
+ char *params, *nick, *txt_identified;
g_return_if_fail(data != NULL);
- params = event_get_params(data, 2, NULL, &nick);
- printformat(server, nick, MSGLEVEL_CRAP,
- IRCTXT_WHOIS_REGISTERED, nick);
+ params = event_get_params(data, 3, NULL, &nick, &txt_identified);
+ if (*txt_identified != '\0') {
+ printformat(server, nick, MSGLEVEL_CRAP,
+ IRCTXT_WHOIS_REGISTERED, nick);
+ } else {
+ /* or /USERIP reply in undernet.. */
+ event_received(server, data);
+ }
g_free(params);
}
@@ -436,7 +441,7 @@ static void event_whois_modes(IRC_SERVER_REC *server, const char *data)
static void event_whois_realhost(IRC_SERVER_REC *server, const char *data)
{
- char *params, *nick, *txt_real, *txt_hostname, *hostname, *text;
+ char *params, *nick, *txt_real, *txt_hostname, *hostname;
g_return_if_fail(data != NULL);
@@ -458,9 +463,7 @@ static void event_whois_realhost(IRC_SERVER_REC *server, const char *data)
IRCTXT_WHOIS_REALHOST, nick, hostname, "");
} else {
/* OPN's dancer uses for end of /MAP */
- g_free(params);
- params = event_get_params(data, 2, NULL, &text);
- printtext(server, NULL, MSGLEVEL_CRAP, "%s", text);
+ event_received(server, data);
}
g_free(params);
}
@@ -486,21 +489,18 @@ static void event_whois_realhost327(IRC_SERVER_REC *server, const char *data)
/* <yournick> <hostname> <ip> :Real hostname/IP */
params = event_get_params(data, 5, NULL, &nick, &hostname, &ip, &text);
- if (*text == '\0') {
- g_free(params);
-
- params = event_get_params(data, 2, NULL, &text);
- printtext(server, NULL, MSGLEVEL_CRAP, "%s", text);
- } else {
+ if (*text != '\0') {
printformat(server, nick, MSGLEVEL_CRAP,
IRCTXT_WHOIS_REALHOST, nick, hostname, ip);
+ } else {
+ event_received(server, data);
}
g_free(params);
}
static void event_whois_usermode(IRC_SERVER_REC *server, const char *data)
{
- char *params, *txt_usermodes, *nick, *usermode, *text;
+ char *params, *txt_usermodes, *nick, *usermode;
g_return_if_fail(data != NULL);
@@ -514,9 +514,7 @@ static void event_whois_usermode(IRC_SERVER_REC *server, const char *data)
} else {
/* some servers use this as motd too..
and OPN's dancer for /MAP */
- g_free(params);
- params = event_get_params(data, 2, NULL, &text);
- printtext(server, NULL, MSGLEVEL_CRAP, "%s", text);
+ event_received(server, data);
}
g_free(params);
}