This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Syntax for a List of triggers

Old posts that have not been replied to for several years.
Locked
User avatar
Cougar
Voice
Posts: 3
Joined: Mon Mar 07, 2005 5:31 am
Location: The Promised Land

Syntax for a List of triggers

Post by Cougar »

I'm doing a small script to kick users who use violence against the bot in ACTIONS.

But I ran up against a problem. I attempted to replace the || or statements with the trigger words with a variable called $violence. But I dont think my idea to set $violence { "*keyword*" } is right.. since its clearly failing to kick now.

if {[string match -nocase $violence $text]} {

Any ideas?? (yes I set the variable as a global.) Thanks.

- Cougar
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Re: Syntax for a List of triggers

Post by De Kus »

Cougar wrote:set $violence { "*keyword*" }
If you really use this line, I can tell you 2 errors, the first one is probably just a type from your script, you would fail to load it otherweise:
1st: its set violence <param> (without $ ^^)
2nd: have you ever checked the content of $violence? It will be

Code: Select all

"*keyword*"
yes, including the quote marks. So if someone says:
You are a keyword
match will try to compare "*keyword*" against You are a keyword and however won't find a match, because there are no quotes within his text :D.
[08:15:20] #De_Kus# set testvar { "*keyword*" }
Ok, set.
[08:15:24] #De_Kus# set testvar
Currently: "*keyword*"
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
Locked