diff options
author | Valentin Batz <senneth@irssi.org> | 2004-09-16 08:31:59 +0000 |
---|---|---|
committer | senneth <senneth@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2004-09-16 08:31:59 +0000 |
commit | 0a4b38295dc133f8724b698c89e41c031f14402f (patch) | |
tree | 29671934df51b7d5f4ab71a6c6584627e1ee4ed5 /src/fe-common | |
parent | adfa7aff12b3b02f5429ea4adfc92202dba222f2 (diff) | |
download | irssi-0a4b38295dc133f8724b698c89e41c031f14402f.zip |
Added recoding of realname to who and whois replies
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3300 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-common')
-rw-r--r-- | src/fe-common/irc/fe-events-numeric.c | 8 | ||||
-rw-r--r-- | src/fe-common/irc/fe-whois.c | 11 |
2 files changed, 13 insertions, 6 deletions
diff --git a/src/fe-common/irc/fe-events-numeric.c b/src/fe-common/irc/fe-events-numeric.c index f67cd844..b2f3b3dc 100644 --- a/src/fe-common/irc/fe-events-numeric.c +++ b/src/fe-common/irc/fe-events-numeric.c @@ -106,7 +106,7 @@ static void event_end_of_names(IRC_SERVER_REC *server, const char *data, static void event_who(IRC_SERVER_REC *server, const char *data) { char *params, *nick, *channel, *user, *host, *stat, *realname, *hops; - char *serv; + char *serv, *recoded; g_return_if_fail(data != NULL); @@ -118,11 +118,13 @@ static void event_who(IRC_SERVER_REC *server, const char *data) while (*realname != '\0' && *realname != ' ') realname++; while (*realname == ' ') realname++; if (realname > hops) realname[-1] = '\0'; - + + recoded = recode_in(realname, nick); printformat(server, NULL, MSGLEVEL_CRAP, IRCTXT_WHO, - channel, nick, stat, hops, user, host, realname, serv); + channel, nick, stat, hops, user, host, recoded, serv); g_free(params); + g_free(recoded); } static void event_end_of_who(IRC_SERVER_REC *server, const char *data) diff --git a/src/fe-common/irc/fe-whois.c b/src/fe-common/irc/fe-whois.c index dfab7c5e..e539e3c1 100644 --- a/src/fe-common/irc/fe-whois.c +++ b/src/fe-common/irc/fe-whois.c @@ -6,6 +6,7 @@ #include "levels.h" #include "misc.h" #include "settings.h" +#include "recode.h" #include "irc-servers.h" @@ -13,15 +14,17 @@ static void event_whois(IRC_SERVER_REC *server, const char *data) { - char *params, *nick, *user, *host, *realname; + char *params, *nick, *user, *host, *realname, *recoded; g_return_if_fail(data != NULL); params = event_get_params(data, 6, NULL, &nick, &user, &host, NULL, &realname); + recoded = recode_in(realname, nick); printformat(server, nick, MSGLEVEL_CRAP, - IRCTXT_WHOIS, nick, user, host, realname); + IRCTXT_WHOIS, nick, user, host, recoded); g_free(params); + g_free(recoded); } static void event_whois_special(IRC_SERVER_REC *server, const char *data) @@ -299,15 +302,17 @@ static void event_whois_auth(IRC_SERVER_REC *server, const char *data) static void event_whowas(IRC_SERVER_REC *server, const char *data) { - char *params, *nick, *user, *host, *realname; + char *params, *nick, *user, *host, *realname, *recoded; g_return_if_fail(data != NULL); params = event_get_params(data, 6, NULL, &nick, &user, &host, NULL, &realname); + recoded = recode_in(realname, nick); printformat(server, nick, MSGLEVEL_CRAP, IRCTXT_WHOWAS, nick, user, host, realname); g_free(params); + g_free(recoded); } static void event_end_of_whowas(IRC_SERVER_REC *server, const char *data) |