mirror of
https://github.com/irssi/irssi.git
synced 2026-08-16 15:12:11 +02:00
Fix #291, "/msg +#channel incorrectly shows up as Nick:@#channel"
Just passing the full target to the "message irc op_public" signal handler and letting it do the cleanup. The fe_channel_skip_prefix() call in event_privmsg() is kept because recode_in() needs a real channel name, but There was similar code in sig_message_own_wall(), but that one is correct - the /wall command always sends NOTICE @#chan, so I added a comment down there to make it clear.
This commit is contained in:
parent
85223a9b6b
commit
bf36f71b99
2 changed files with 23 additions and 9 deletions
|
|
@ -56,11 +56,13 @@ static void event_privmsg(IRC_SERVER_REC *server, const char *data,
|
|||
|
||||
if (fe_channel_is_opchannel(server, target)) {
|
||||
/* Hybrid 6 feature, send msg to all ops in channel */
|
||||
target = (char *)fe_channel_skip_prefix(server, target);
|
||||
recoded = recode_in(SERVER(server), msg, target);
|
||||
const char *cleantarget = fe_channel_skip_prefix(server, target);
|
||||
recoded = recode_in(SERVER(server), msg, cleantarget);
|
||||
|
||||
/* pass the original target to the signal, with the @+ here
|
||||
* the other one is only needed for recode_in*/
|
||||
signal_emit("message irc op_public", 5,
|
||||
server, recoded, nick, addr,
|
||||
get_visible_target(server, target));
|
||||
server, recoded, nick, addr, target);
|
||||
} else {
|
||||
recoded = recode_in(SERVER(server), msg, server_ischannel(SERVER(server), target) ? target : nick);
|
||||
signal_emit(server_ischannel(SERVER(server), target) ?
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue