diff options
author | Emanuele Giaquinta <exg@irssi.org> | 2008-11-08 22:09:20 +0000 |
---|---|---|
committer | exg <exg@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2008-11-08 22:09:20 +0000 |
commit | 110f94ceb64fa2654a615d9a5e5a5273b662c45c (patch) | |
tree | f803241ca397c785882c68c0f59f2c58eb3cf9bb /src | |
parent | b230d73dd8221ca1480a9dcf7886da42a72f4c02 (diff) | |
download | irssi-110f94ceb64fa2654a615d9a5e5a5273b662c45c.zip |
Recode a WALL message also when sending a notice to @#channel.
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4887 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src')
-rw-r--r-- | src/irc/core/irc-commands.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/irc/core/irc-commands.c b/src/irc/core/irc-commands.c index fba686f4..bac66f08 100644 --- a/src/irc/core/irc-commands.c +++ b/src/irc/core/irc-commands.c @@ -644,37 +644,36 @@ static void cmd_wall(const char *data, IRC_SERVER_REC *server, WI_ITEM_REC *item chanrec = irc_channel_find(server, channame); if (chanrec == NULL) cmd_param_error(CMDERR_CHAN_NOT_FOUND); + recoded = recode_out(SERVER(server), msg, channame); /* See if the server has advertised support of wallchops */ if (g_hash_table_lookup(chanrec->server->isupport, "statusmsg") || g_hash_table_lookup(chanrec->server->isupport, "wallchops")) - irc_send_cmdv(server, "NOTICE @%s :%s", chanrec->name, msg); + irc_send_cmdv(server, "NOTICE @%s :%s", chanrec->name, recoded); else { /* Fall back to manually noticing each op */ nicks = NULL; g_hash_table_foreach(chanrec->nicks, (GHFunc) cmd_wall_hash, &nicks); - args = g_strconcat(chanrec->name, " ", msg, NULL); + args = g_strconcat(chanrec->name, " ", recoded, NULL); msg = parse_special_string(settings_get_str("wall_format"), SERVER(server), item, args, NULL, 0); g_free(args); - recoded = recode_out(SERVER(server), msg, channame); - for (tmp = nicks; tmp != NULL; tmp = tmp->next) { NICK_REC *rec = tmp->data; if (rec != chanrec->ownnick) { irc_send_cmdv(server, "NOTICE %s :%s", - rec->nick, recoded); + rec->nick, msg); } } - g_free(recoded); g_free(msg); g_slist_free(nicks); } + g_free(recoded); cmd_params_free(free_arg); } |