mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05:00
Added recode for the away-messages
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3321 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
1d834b39b3
commit
569b9efc7e
@ -311,11 +311,12 @@ static void event_unaway(IRC_SERVER_REC *server, const char *data)
|
|||||||
|
|
||||||
static void event_away(IRC_SERVER_REC *server, const char *data)
|
static void event_away(IRC_SERVER_REC *server, const char *data)
|
||||||
{
|
{
|
||||||
char *params, *nick, *awaymsg;
|
char *params, *nick, *awaymsg, *recoded;
|
||||||
|
|
||||||
g_return_if_fail(data != NULL);
|
g_return_if_fail(data != NULL);
|
||||||
|
|
||||||
params = event_get_params(data, 3, NULL, &nick, &awaymsg);
|
params = event_get_params(data, 3, NULL, &nick, &awaymsg);
|
||||||
|
recoded = recode_in(awaymsg, nick);
|
||||||
if (!settings_get_bool("show_away_once") ||
|
if (!settings_get_bool("show_away_once") ||
|
||||||
last_away_nick == NULL || g_strcasecmp(last_away_nick, nick) != 0 ||
|
last_away_nick == NULL || g_strcasecmp(last_away_nick, nick) != 0 ||
|
||||||
last_away_msg == NULL || g_strcasecmp(last_away_msg, awaymsg) != 0) {
|
last_away_msg == NULL || g_strcasecmp(last_away_msg, awaymsg) != 0) {
|
||||||
@ -327,9 +328,10 @@ static void event_away(IRC_SERVER_REC *server, const char *data)
|
|||||||
last_away_msg = g_strdup(awaymsg);
|
last_away_msg = g_strdup(awaymsg);
|
||||||
|
|
||||||
printformat(server, nick, MSGLEVEL_CRAP,
|
printformat(server, nick, MSGLEVEL_CRAP,
|
||||||
IRCTXT_NICK_AWAY, nick, awaymsg);
|
IRCTXT_NICK_AWAY, nick, recoded);
|
||||||
}
|
}
|
||||||
g_free(params);
|
g_free(params);
|
||||||
|
g_free(recoded);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void event_userhost(IRC_SERVER_REC *server, const char *data)
|
static void event_userhost(IRC_SERVER_REC *server, const char *data)
|
||||||
|
@ -266,14 +266,16 @@ static void event_whois_channels(IRC_SERVER_REC *server, const char *data)
|
|||||||
|
|
||||||
static void event_whois_away(IRC_SERVER_REC *server, const char *data)
|
static void event_whois_away(IRC_SERVER_REC *server, const char *data)
|
||||||
{
|
{
|
||||||
char *params, *nick, *awaymsg;
|
char *params, *nick, *awaymsg, *recoded;
|
||||||
|
|
||||||
g_return_if_fail(data != NULL);
|
g_return_if_fail(data != NULL);
|
||||||
|
|
||||||
params = event_get_params(data, 3, NULL, &nick, &awaymsg);
|
params = event_get_params(data, 3, NULL, &nick, &awaymsg);
|
||||||
|
recoded = recode_in(awaymsg, nick);
|
||||||
printformat(server, nick, MSGLEVEL_CRAP,
|
printformat(server, nick, MSGLEVEL_CRAP,
|
||||||
IRCTXT_WHOIS_AWAY, nick, awaymsg);
|
IRCTXT_WHOIS_AWAY, nick, recoded);
|
||||||
g_free(params);
|
g_free(params);
|
||||||
|
g_free(recoded);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void event_end_of_whois(IRC_SERVER_REC *server, const char *data)
|
static void event_end_of_whois(IRC_SERVER_REC *server, const char *data)
|
||||||
|
Loading…
Reference in New Issue
Block a user