New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/msg +#channel (wallvoices) incorrectly shows up as Nick:@#channel #291

Closed
ailin-nemui opened this Issue Sep 21, 2015 · 4 comments

Comments

Projects
None yet
3 participants
@ailin-nemui
Contributor

ailin-nemui commented Sep 21, 2015

No description provided.

@ailin-nemui

This comment has been minimized.

Contributor

ailin-nemui commented Sep 21, 2015

@LemonBoy you may know about this

@LemonBoy

This comment has been minimized.

Member

LemonBoy commented Sep 21, 2015

Here's the culprit [1] and it's evil sibling [2]. As we strip all the prefixes before emitting the signal, we should just print the channel name or send the original string and show the possibly ugly name.
As a bonus, here's a brainfart [3], it should just return target instead of false (why did an integer got promoted as pointer with no warning at all ?)

[1] https://github.com/irssi/irssi/blob/master/src/fe-common/irc/fe-irc-messages.c#L78
[2] https://github.com/irssi/irssi/blob/master/src/fe-common/irc/fe-irc-messages.c#L95
[3] https://github.com/irssi/irssi/blob/master/src/fe-common/irc/fe-irc-channels.c#L58,L59

@dequis

This comment has been minimized.

Member

dequis commented Sep 21, 2015

Also relevant https://github.com/irssi/irssi/blob/master/src/fe-common/irc/fe-events.c#L59

I guess yeah the skip prefix should be moved to the op_public handler instead.

Not sure what's the deal with own_wall, should look into that one separately.

(why did an integer got promoted as pointer with no warning at all ?)

Probably because FALSE is a constant 0 and that is the same as returning NULL.

@dequis

This comment has been minimized.

Member

dequis commented Sep 22, 2015

Went ahead and did it myself, #295

@dequis dequis closed this in bf36f71 Sep 22, 2015

ailin-nemui added a commit that referenced this issue Sep 22, 2015

Merge pull request #295 from dequis/fix-bug-291
Fix #291, "/msg +#channel incorrectly shows up as Nick:@#channel"

ailin-nemui added a commit to ailin-nemui/irssi that referenced this issue Sep 23, 2015

Fix irssi#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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment