1
0
mirror of https://github.com/irssi/irssi.git synced 2025-02-02 15:08:01 -05:00

fixed a bug in recode when target is NULL and really use the recoded string for printing

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4042 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Valentin Batz 2005-10-16 11:16:33 +00:00 committed by vb
parent 4a7107437d
commit 0b8a23ad63
2 changed files with 4 additions and 4 deletions

View File

@ -88,7 +88,7 @@ char *recode_in(const SERVER_REC *server, const char *str, const char *target)
str_is_utf8 = g_utf8_validate(str, len, NULL);
translit = settings_get_bool("recode_transliterate");
if (server != NULL)
if (server != NULL && target != NULL)
tagtarget = server->tag == NULL ? NULL :
g_strdup_printf("%s/%s", server->tag, target);
if (tagtarget != NULL)
@ -154,7 +154,7 @@ char *recode_out(const SERVER_REC *server, const char *str, const char *target)
char *translit_to = NULL;
char *tagtarget = NULL;
if (server != NULL)
if (server != NULL && target != NULL)
tagtarget = server->tag == NULL ? NULL :
g_strdup_printf("%s/%s", server->tag, target);
if (tagtarget != NULL)

View File

@ -196,7 +196,7 @@ static void sig_message_own_notice(IRC_SERVER_REC *server, const char *msg,
char *recoded = recode_in(SERVER(server), msg, target);
printformat(server, skip_target(target), MSGLEVEL_NOTICES |
MSGLEVEL_NOHILIGHT | MSGLEVEL_NO_ACT,
IRCTXT_OWN_NOTICE, target, msg);
IRCTXT_OWN_NOTICE, target, recoded);
g_free(recoded);
}
@ -216,7 +216,7 @@ static void sig_message_irc_notice(SERVER_REC *server, const char *msg,
if (!ignore_check(server, nick, "",
target, msg, MSGLEVEL_SNOTES)) {
printformat(server, target, MSGLEVEL_SNOTES,
IRCTXT_NOTICE_SERVER, nick, msg);
IRCTXT_NOTICE_SERVER, nick, recoded);
}
g_free(recoded);
return;