irssi-import / bugs.irssi.org

bugs.irssi.org archive
https://github.com/irssi/irssi/issues
0 stars 0 forks source link

/ignore <x> HILIGHTS doesnt work #754

Open irssibot opened 14 years ago

irssibot commented 14 years ago

Ignoring just HILIGHTS from any target, does not work, the hilight triggers regardless whether it be a channel or nick.

irssibot commented 14 years ago

Are you trying to add hilight exceptions using /ignore?

There is no way in irssi itself to add exceptions for hilights at the moment (and using /ignore for it wouldn't make sense). You can use the trigger.pl script as a workaround (see the examples in its docs).

Or are you really trying to ignore (hide) lines that match a hilight?

irssibot commented 14 years ago

I need to be able to set it so that for certain channels/nicknames hilights dont trigger. I've tried trigger.pl, but i could never get it to work properly.

Especially for bots, which happen to state my realname - i don't really want to be hilighted by them.

If ignoring just hilights from targets is not allowed, then the target needs to be removed from /help ignore and /ignore, so it errors when people try to use it.

irssibot commented 14 years ago

Ideally, you should be able to ignore or simply strip the level (HILIGHT), allthough i've not looked at the code, to see how pheasable either of these are.

/ignore [-strip?] ? should be able to simply drop any lines that trigger the ignore (or other targets for that matter?) similar to a normal ignore or even strip the level.

If ignoring hilights like this isn't supported, then at least some way to halt processing of hilights or strip the level if they match an exception, e.g. /hilight -except "x,y,z,#blah" ?

At the moment i dont have any anway to stop hilights triggering for a specific target, its the one thing that most

irssibot commented 14 years ago
irssibot commented 14 years ago

I added the -invert switch that suppresses hilighting if the /hilight-entry matches a message.

http://gist.github.com/476285

Atm this only works with messages handled by sig_message_public in src/fe-common/core/fe-messages.c.

It suffers a lot from -priority not beeing implemented.

But this should be sufficent to block bitlbee from hilighting you at every jabber.org reconnect.

irssibot commented 14 years ago

Thanks for the patch, it's a start. But I'm not going to commit it until it is more complete, there's already enough confusing behaviour in /hilight.

To be consistent with /ignore, the option should probably be called -except.

For -line or -word hilights, the problem is that the exception could match in fe-messages, but not in hilight-text where the hilight we want to override is matched. Some ideas for how to make that work (other suggestions are welcome):

For exceptions (if you don't set a priority on them) I'd expect an -except to "win" over another hilight. That way you don't need -priority to make -except work at all. So I see these as two separate (only partly overlapping) issues. But practically, it probably makes sense to implement them in one go :)

irssibot commented 14 years ago
  1. Would it be possible to move the hilighting code in fe-messages to hilight-text?
  2. Couldn't hilighting of current nickname be a "normal" hilight, like '-regex "^$N. "' ? This would simplify hilighting extremely and also add the feature to change the format of a nickname-hilight.
  3. If attaching the hilight to TEXT_DEST_REC, shouldn't one also remove the variables hilight_priority, hilight_color (, flags?) to avoid redundancy? (This sounds like a lot of stupid work, so I better ask before doing it)
irssibot commented 14 years ago

This still bothers me, I am still willing to fix it, but I need your feedback.

irssibot commented 14 years ago

Sorry for the late reply. I hope it still bothers you enough :)

  1. No, I don't think so. Because at hilight-text you A. can't do a -nick hilight because all you have is a blob of text; you don't know which part is the nick. To do that we'd need some special markers (using the irssi internal format stuff also used for colors) in text surrounding the nick, so it can be found back later to change its color. That would also mean dropping the feature of having separately configuratble hilight_* formats (but that's not a really big deal imo). So not entirely impossible but it does mean more changes... B. can't check -mask hilights anymore because you don't know who the message came from at that layer. Unless we add extra stuff to pass that around... C. You don't want everything in the line being printed to be checked for hilights. For example you don't want to hilight yourself every time you say something because the line contains your own nick. (That could be avoided by checking for the same marker as in A, but that makes it more complicated). Another example: some formats for messages contain the channel name, and you don't want a hilight on "irssi" to trigger every time someone says something in #irssi. (And we could solve that by having other markers saying which parts should be checked for hilights and which shouldn't... making it even more complicated).
  2. That would also be a nice feature yes.
  3. Correct