Skip to content
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

/me triggers highlight if originator's nick matches highlight rule #206

Closed
nyuszika7h opened this Issue Sep 20, 2014 · 10 comments

Comments

Projects
None yet
4 participants
@nyuszika7h
Copy link
Contributor

commented Sep 20, 2014

Savannah bug: https://savannah.nongnu.org/bugs/?func=detailitem&item_id=40516

It's marked as fixed, but it doesn't appear to be.

Steps to reproduce:

  • Set weechat.look.highlight to your primary nick. (This works with highlight_regex as well, try setting it to the nick surrounded by .* on both sides.)
  • Open a secondary connection and join a channel that your primary connection is also in.
  • Do /me tests in the common channel from the primary connection.

Expected result:

No highlight, since foo is the nick of a user, not a part of the message.

Actual result:

A highlight is triggered.

@nyuszika7h nyuszika7h changed the title /me from a user with a nick matching your highlight settings will cause a highlight /me triggers highlight if originator's nick matches highlight rule Sep 20, 2014

@jlu5

This comment has been minimized.

Copy link

commented Sep 21, 2014

Sort of related, but this also happens when you're connected with multiple clients to something like ZNC. In that case, you're able to highlight yourself (from another client) just by saying your nick.

@Mikaela

This comment has been minimized.

Copy link
Contributor

commented Sep 21, 2014

I think I have reported this at IRC some time ago, but no one could reproduce this and I didn't have information needed for reproducing this.

@flashcode

This comment has been minimized.

Copy link
Member

commented Sep 21, 2014

@nyuszika7h: can you please check that without any scripts loaded? (like colorize_nicks.py)
Scripts can change the prefix/message content, and then WeeChat will not detect correctly the nick in beginning of message. If I remember, someone reported such problem with colorize_nicks.py some months ago.
So at least, we'll know if the problem is caused by a script or not.

@nyuszika7h

This comment has been minimized.

Copy link
Contributor Author

commented Sep 21, 2014

I can't seem to reproduce this on freenode even without unloading any scripts. I think this is caused by my script: https://gist.github.com/nyuszika7h/0b47f39eba1232baa8ac

@flashcode

This comment has been minimized.

Copy link
Member

commented Sep 21, 2014

If your script is changing the content of message or nick, then obviously this can fool WeeChat which is then not able to detect properly the nick.

@flashcode

This comment has been minimized.

Copy link
Member

commented Sep 21, 2014

Maybe you should take care about ACTION messages in your script?

@nyuszika7h

This comment has been minimized.

Copy link
Contributor Author

commented Sep 21, 2014

It's weird, because apparently I need to be voiced or opped for the other connection to get highlighted. (/me sent from sillynet, received on sillynet-notaserv).

@flashcode

This comment has been minimized.

Copy link
Member

commented Sep 21, 2014

Ah, I see what is the problem. It's when option irc.look.nick_mode is set to action or both, which is adding the nick prefix before the nick in action message.
And in this case, WeeChat does not detect the nick, and can trigger a highlight.
Is that your problem?

@nyuszika7h

This comment has been minimized.

Copy link
Contributor Author

commented Sep 21, 2014

Yes, I can reproduce this in a clean WeeChat profile with irc.look.nick_mode set to action or both. (It's set to both in my main client.)

@flashcode flashcode removed the waiting info label Sep 21, 2014

@flashcode flashcode added this to the 1.0.1 milestone Sep 21, 2014

@flashcode flashcode self-assigned this Sep 21, 2014

flashcode added a commit that referenced this issue Sep 21, 2014

core: fix highlight of IRC action messages when option irc.look.nick_…
…mode is set to "action" or "both" (closes #206)

(cherry picked from commit 1a20ef4)

@flashcode flashcode closed this in 1a20ef4 Sep 21, 2014

@nyuszika7h

This comment has been minimized.

Copy link
Contributor Author

commented Sep 21, 2014

That was fast. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.