1
0
mirror of https://github.com/irssi/irssi.git synced 2024-10-27 05:20:20 -04:00

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
This commit is contained in:
Timo Sirainen 2001-12-10 00:38:12 +00:00 committed by cras
parent 83adc00160
commit 45bb286d59

View File

@ -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) 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); g_return_if_fail(data != NULL);
params = event_get_params(data, 2, NULL, &nick); params = event_get_params(data, 3, NULL, &nick, &txt_identified);
if (*txt_identified != '\0') {
printformat(server, nick, MSGLEVEL_CRAP, printformat(server, nick, MSGLEVEL_CRAP,
IRCTXT_WHOIS_REGISTERED, nick); IRCTXT_WHOIS_REGISTERED, nick);
} else {
/* or /USERIP reply in undernet.. */
event_received(server, data);
}
g_free(params); 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) 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); 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, ""); IRCTXT_WHOIS_REALHOST, nick, hostname, "");
} else { } else {
/* OPN's dancer uses for end of /MAP */ /* OPN's dancer uses for end of /MAP */
g_free(params); event_received(server, data);
params = event_get_params(data, 2, NULL, &text);
printtext(server, NULL, MSGLEVEL_CRAP, "%s", text);
} }
g_free(params); 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 */ /* <yournick> <hostname> <ip> :Real hostname/IP */
params = event_get_params(data, 5, NULL, &nick, &hostname, &ip, &text); params = event_get_params(data, 5, NULL, &nick, &hostname, &ip, &text);
if (*text == '\0') { if (*text != '\0') {
g_free(params);
params = event_get_params(data, 2, NULL, &text);
printtext(server, NULL, MSGLEVEL_CRAP, "%s", text);
} else {
printformat(server, nick, MSGLEVEL_CRAP, printformat(server, nick, MSGLEVEL_CRAP,
IRCTXT_WHOIS_REALHOST, nick, hostname, ip); IRCTXT_WHOIS_REALHOST, nick, hostname, ip);
} else {
event_received(server, data);
} }
g_free(params); g_free(params);
} }
static void event_whois_usermode(IRC_SERVER_REC *server, const char *data) 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); g_return_if_fail(data != NULL);
@ -514,9 +514,7 @@ static void event_whois_usermode(IRC_SERVER_REC *server, const char *data)
} else { } else {
/* some servers use this as motd too.. /* some servers use this as motd too..
and OPN's dancer for /MAP */ and OPN's dancer for /MAP */
g_free(params); event_received(server, data);
params = event_get_params(data, 2, NULL, &text);
printtext(server, NULL, MSGLEVEL_CRAP, "%s", text);
} }
g_free(params); g_free(params);
} }