irssi-scripts icon indicating copy to clipboard operation
irssi-scripts copied to clipboard

[trigger.pl] -channels and -masks doesn't seem to work?

Open alshain opened this issue 13 years ago • 10 comments

Hi, I'm trying not go get hilighted by a certain bot. This is what I have tried:

/TRIGGER ADD -all -mask 'BotNick!*@*' -regexp '(al)(shain)' -nocase -replace '$1\x02\x02$2'

I can't seem to get it to work. (Yes, I want to rely on the nick only. I have also tried '!BotIdent@' but it didn't work either) Now, what does work is this:

/TRIGGER ADD -all  -regexp '(al)(shain)' -nocase -replace '$1\x02\x02$2'

However, that serves little purpose

So I thought about disabling hilighting in a channel:

/TRIGGER ADD -all -channels #nohilight -regexp '(al)(shain)' -nocase -replace '$1\x02\x02$2'

I hope I'm doing something very wrong, because I think these functions are essential and surely somebody would have stumbled across the same problem.

Thanks in advance!

alshain avatar May 01 '11 21:05 alshain

I've got the exact same problem. -masks doesn't work at all, it'll never match or trigger.

donnex avatar Jul 14 '11 08:07 donnex

Cool, I'm not alone on this anymore :)

alshain avatar Jul 14 '11 10:07 alshain

Which version are you using? the current one on http://irssi.org/scripts, 1.0? If so, can you try the one on github (master) here (https://github.com/coekie/irssi-scripts/raw/master/trigger.pl), 1.0+. I suspect it's already been fixed long ago, but I just haven't released a new version with the fix in it...

coekie avatar Jul 25 '11 19:07 coekie

I'm sorry for not replying for such a long time, somehow this mail was lost in the flood of other messages :)

I'm now using the one from github as you suggested, it doesn't work either though.

In fact, none of the examples seem to work: I have tried the example command:

/TRIGGER ADD -all -nocase -regexp shit -replace sh*t

From what I understand, this should replace "shit" with "sh*t" whenever this occurs somewhere, i.e. also when I send it to a channel. However, the replace doesn't happen.

Is it possible, that I lack certain perl libraries?

Thanks

alshain avatar Aug 22 '11 10:08 alshain

-all does not include messages you send. It only includes "normal IRC event types" received from the server, as listed in /trigger help.

coekie avatar Aug 22 '11 20:08 coekie

Oh, I see.

I'm sorry, I had misread the following:

  The normal IRC event types are: [...]
  -all is an alias for all of those.
  Additionally, there is:
       rawin: raw text incoming from the server
       send_command: commands you give to irssi
       send_text: lines you type that aren't commands

I interpreted this wrongly and thought -all would include send_text, but when I read this again, it's rather clear it doesn't :)

I'll yet have to try the mask stuff again to see whether the original problem has been resolved.

I shall report back later, thanks!

alshain avatar Aug 23 '11 06:08 alshain

I am having exactly the same issue with the current version 1.0+.

I tried it also with shit and it does not get replaced (If someone else writes it!)

xoration avatar Dec 28 '12 21:12 xoration

I have the same problem. Using the latest version (1.0+) from this GitHub repo.

/TRIGGER ADD -all -mask 'BotNick!*@*' -regexp '(al)(shain)' -nocase -replace '$1\x02\x02$2'

joech4n avatar Apr 03 '13 22:04 joech4n

For me -publics -nocase -channels '#a #b' -masks 'bot!*@*' -regexp '(ni)(co)' -replace '$1\x02\x02$2' works fine with the 1.0+ version. Maybe -nocase is the problem.

incognico avatar Apr 04 '13 21:04 incognico

Anyone figure this out?

YoungElPaso avatar Jun 02 '15 19:06 YoungElPaso