Revert part of r4041. It is not clear which bug it is supposed to fix, and the

change seems wrong anyway because notice/action message is already recoded in
fe-events.c:event_notice/ctcp_action.


git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4888 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Emanuele Giaquinta 2008-11-09 19:37:25 +00:00 committed by exg
commit c647f8b206

View file

@ -167,7 +167,7 @@ static void sig_message_irc_action(IRC_SERVER_REC *server, const char *msg,
{ {
void *item; void *item;
const char *oldtarget; const char *oldtarget;
char *freemsg = NULL, *recoded; char *freemsg = NULL;
int level; int level;
oldtarget = target; oldtarget = target;
@ -187,28 +187,26 @@ static void sig_message_irc_action(IRC_SERVER_REC *server, const char *msg,
if (settings_get_bool("emphasis")) if (settings_get_bool("emphasis"))
msg = freemsg = expand_emphasis(item, msg); msg = freemsg = expand_emphasis(item, msg);
recoded = recode_in(SERVER(server), msg, target);
if (ischannel(*target)) { if (ischannel(*target)) {
/* channel action */ /* channel action */
if (window_item_is_active(item) && target == oldtarget) { if (window_item_is_active(item) && target == oldtarget) {
/* message to active channel in window */ /* message to active channel in window */
printformat(server, target, level, printformat(server, target, level,
IRCTXT_ACTION_PUBLIC, nick, recoded); IRCTXT_ACTION_PUBLIC, nick, msg);
} else { } else {
/* message to not existing/active channel, or to @/+ */ /* message to not existing/active channel, or to @/+ */
printformat(server, target, level, printformat(server, target, level,
IRCTXT_ACTION_PUBLIC_CHANNEL, IRCTXT_ACTION_PUBLIC_CHANNEL,
nick, oldtarget, recoded); nick, oldtarget, msg);
} }
} else { } else {
/* private action */ /* private action */
printformat(server, nick, MSGLEVEL_ACTIONS | MSGLEVEL_MSGS, printformat(server, nick, MSGLEVEL_ACTIONS | MSGLEVEL_MSGS,
item == NULL ? IRCTXT_ACTION_PRIVATE : item == NULL ? IRCTXT_ACTION_PRIVATE :
IRCTXT_ACTION_PRIVATE_QUERY, IRCTXT_ACTION_PRIVATE_QUERY,
nick, address == NULL ? "" : address, recoded); nick, address == NULL ? "" : address, msg);
} }
g_free(recoded);
g_free_not_null(freemsg); g_free_not_null(freemsg);
} }
@ -228,20 +226,17 @@ static void sig_message_irc_notice(SERVER_REC *server, const char *msg,
const char *target) const char *target)
{ {
const char *oldtarget; const char *oldtarget;
char *recoded;
oldtarget = target; oldtarget = target;
target = skip_target(IRC_SERVER(server), target); target = skip_target(IRC_SERVER(server), target);
if (address == NULL || *address == '\0') { if (address == NULL || *address == '\0') {
/* notice from server */ /* notice from server */
recoded = recode_in(SERVER(server), msg, NULL);
if (!ignore_check(server, nick, "", if (!ignore_check(server, nick, "",
target, msg, MSGLEVEL_SNOTES)) { target, msg, MSGLEVEL_SNOTES)) {
printformat(server, target, MSGLEVEL_SNOTES, printformat(server, target, MSGLEVEL_SNOTES,
IRCTXT_NOTICE_SERVER, nick, recoded); IRCTXT_NOTICE_SERVER, nick, msg);
} }
g_free(recoded);
return; return;
} }
@ -250,19 +245,17 @@ static void sig_message_irc_notice(SERVER_REC *server, const char *msg,
msg, MSGLEVEL_NOTICES)) msg, MSGLEVEL_NOTICES))
return; return;
recoded = recode_in(SERVER(server), msg, target);
if (ischannel(*target)) { if (ischannel(*target)) {
/* notice in some channel */ /* notice in some channel */
printformat(server, target, MSGLEVEL_NOTICES, printformat(server, target, MSGLEVEL_NOTICES,
IRCTXT_NOTICE_PUBLIC, nick, oldtarget, recoded); IRCTXT_NOTICE_PUBLIC, nick, oldtarget, msg);
} else { } else {
/* private notice */ /* private notice */
privmsg_get_query(SERVER(server), nick, FALSE, privmsg_get_query(SERVER(server), nick, FALSE,
MSGLEVEL_NOTICES); MSGLEVEL_NOTICES);
printformat(server, nick, MSGLEVEL_NOTICES, printformat(server, nick, MSGLEVEL_NOTICES,
IRCTXT_NOTICE_PRIVATE, nick, address, recoded); IRCTXT_NOTICE_PRIVATE, nick, address, msg);
} }
g_free(recoded);
} }
static void sig_message_own_ctcp(IRC_SERVER_REC *server, const char *cmd, static void sig_message_own_ctcp(IRC_SERVER_REC *server, const char *cmd,