Hexchat: Random highlights which don't match anything in "Extra words to highlight"

Created on 11 Jan 2013  ·  13Comments  ·  Source: hexchat/hexchat

irc_extra_hilight = Arna,Arnav,Arny,Arnie,*Arnavion*,Arnavicon,Arniggervion,*navion*,Arnawion,AtashiCon,ARNAVION
irc_nick_hilight = 
irc_no_hilight = NickServ,ChanServ,InfoServ,N,Q,Quotes,Belfiore,Trivia,{Houki}

Examples of a message which highlighted me this morning:

<@gmaxwell> I _thought_ that if the binary was fully static it did manage to link it. Maybe I'm remembering it wrong.

Pasting the same message (via another client) doesn't highlight me again. In other words, this is non-deterministic and almost certainly a bug.


Edit: As it turns out, these phantom highlights only trigger for #bitcoin. The only thing I can think of that's special about that channel is that it's the first channel I (auto-)join in freenode, which itself is the second network I (auto-)connect to. None of the channels in the first network (Rizon) or any other channels in Freenode trigger these highlights.


Edit 2: Above confirmed. Now that I'm also on #gtk+ on GimpNet, this behavior only occurs in that channel. It seems this behavior happens on the first channel of the last network I joined.


Relevant code is in inbound.c (alert_match_word, alert_match_text) and util.c (match).

Possible fix is to replace the loony logic in those methods with GRegex.

Aside: GRegex was introduced in GLib 2.14, so bump up the requirement in configure.ac

bug

Most helpful comment

Latest release, this is happening to me in all channels on all networks.

EDIT: In normal writing you tend to write spaces after commas. In the HL list there should be NO spaces. Removing them between my commas fixed the problem.

All 13 comments

What for? That bug and this one are not the same.

Once you convert this to regex maybe it could handle that better.

Since this issue is difficult to reproduce, I have added temporary code (#400) to inbound.c, outbound.c, inbound.h that records information (timestamp, text, from) for each time is_hilight()'s "if"-statement returns TRUE. It forms a GList of these triplets, whose count is constrained by global uint count371lim and initially 100.

To show the results at any time, type the command "/debug hilight" on any hexchat command line. Here's sample output from that command:
Debugging the hilight problem (issue 371) ---
(Each of the two strings is preceded and followed by the eyecatcher "---")
02/06/13 15:16:42 text:---testme there, rich3abcd--- from:---richtroye---
02/06/13 15:16:46 text:---testme there, rich3abcd--- from:---richtroye---
02/06/13 15:16:48 text:---testme there, rich3abcd--- from:---richtroye---
02/06/13 15:17:11 text:---testme there, rich3abcd--- from:---richtroye---
02/06/13 15:17:11 text:---testme there, rich3abcd--- from:---richtroye---
02/06/13 15:17:11 text:---testme there, rich3abcd--- from:---richtroye---
End of list

Please when you're running this code, be alert for perceived errors pertaining to this Issue. When you see one, run /debug hilight and copy-and-paste the results to a file. Write a note here about what you saw and include pertinent lines from that file.

@RichardHitt considering its temporary why would you make a pull request instead of just pointing us to the branch?

If that is the purpose you made that PR, I could've told you earlier it was unnecessary. I already have a highlight logging script which logs the same information.

Edit: Here's the script - https://raw.github.com/Arnavion/random/master/hexchat/highlight.pl

Hasn't reprod in quite some time (atleast since 2.9.6). Closing.

Started happening again since this morning (two times in 12 hours) :|

This has just started happening to me. I ran /debug hilight, but it only listed the channels and servers I am in. I assume the temporary code @RichardHitt added has been long since removed.

This began after I tried adding a new highlight ('the bot died'): TW,whisper,the bot died,. It then kept happening after I removed the new highlight and went back to the highlights I originally had (TW,whisper,). I even removed everything from the highlight field, and then added back only the ones that I had prior to adding the new one, but it still highlighted random lines. If I delete everything from the field, then I don't get random highlights.

EDIT: Even removing all highlights, restarting the program, and then adding the highlights back again doesn't fix the problem. Still results in random highlights.

Okay, fixed the problem by removing the trailing , from my highlights.

TW,whisper, = random highlights
TW,whisper = no random highlights

This happens to me in the latest release, with or without the trailing comma.

Latest release, this is happening to me in all channels on all networks.

EDIT: In normal writing you tend to write spaces after commas. In the HL list there should be NO spaces. Removing them between my commas fixed the problem.

I also encountered this issue. As per @faithlessfate's solution, stripping the whitespace around each term solved the issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

b818283 picture b818283  ·  7Comments

beatrix-bodo picture beatrix-bodo  ·  8Comments

jpnurmi picture jpnurmi  ·  13Comments

ghost picture ghost  ·  13Comments

skovacs1 picture skovacs1  ·  5Comments