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

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

Open
alshain opened this issue May 1, 2011 · 10 comments
Open

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

alshain opened this issue May 1, 2011 · 10 comments

Comments

@alshain
Copy link

alshain commented May 1, 2011

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!

@donnex
Copy link

donnex commented Jul 14, 2011

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

@alshain
Copy link
Author

alshain commented Jul 14, 2011

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

@coekie
Copy link
Owner

coekie commented Jul 25, 2011

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...

@alshain
Copy link
Author

alshain commented Aug 22, 2011

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

@coekie
Copy link
Owner

coekie commented Aug 22, 2011

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

@alshain
Copy link
Author

alshain commented Aug 23, 2011

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!

@xoration
Copy link

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!)

@joech4n
Copy link

joech4n commented Apr 3, 2013

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'

@incognico
Copy link

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.

@YoungElPaso
Copy link

Anyone figure this out?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants