irssi-scripts
irssi-scripts copied to clipboard
[trigger.pl] -channels and -masks doesn't seem to work?
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!
I've got the exact same problem. -masks doesn't work at all, it'll never match or trigger.
Cool, I'm not alone on this anymore :)
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...
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
-all does not include messages you send. It only includes "normal IRC event types" received from the server, as listed in /trigger help.
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!
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!)
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'
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.
Anyone figure this out?