I need help to send a tell to someone swearing

Posted by CordovaRules on Sun 25 Jun 2006 04:42 PM — 3 posts, 12,222 views.

#0
How do I make a trigger to automatically catch a swear word in a global channel (in this case holler)

example -

Drunkenone hollers, 'oh f*ck off'

How can I make it so I can send him a tell, then automatically ignore him?

tell drunkenone You need to quit swearing before you are muted
ignore drunkenone

can someone please help me?
Australia Forum Administrator #1
This trigger should do it.


<triggers>
  <trigger
   custom_colour="7"
   enabled="y"
   match="^([A-Za-z]+) hollers\, \'.*\b(aaaa|bbbb|cccc)+\b.*\'$"
   regexp="y"
   sequence="100"
  >
  <send>tell %1 You need to quit swearing before you are muted
ignore %1</send>
  </trigger>
</triggers>



The 4-letter swearwords you want to match on are (in this example) "aaaa", "bbbb" and "cccc". You can add more by putting them there with | between each one.

You could get slightly fancier and put the swearwords into a variable, rather than inside the trigger itself.

I have used \b at each end of the swearword list so it has to match on the complete word. You may want to remove those, so it will catch a swearword inside a longer word.

For example, if the swearword is "bonk" then it will match on "bonk" but not "bonker" or "bonked". If you remove the 2 \b in the regular expression it will also match those.
USA #2
On the other hand, it is important to get this kind of thing right, and you're better off recognizing on word boundaries. For a simple example, if you consider the 3-letter word for 'rear', you would trigger on "assassinate", "assassin", etc. Probably not what you wanted.