mIRC Home    About    Download    Register    News    Help

Print Thread
#88258 26/06/04 03:17 PM
Joined: Jun 2004
Posts: 3
A
Self-satisified door
OP Offline
Self-satisified door
A
Joined: Jun 2004
Posts: 3
Hi to all again

i am tring to make a script with unlimted reaction levels

lets say i have in queue 4 commands

1warn
2kick
3kickban
4etc.

etc.

and now

if (%Nick. [ $+ [ $chan ] $+ [ $nick ] ] >= N) { do stuff }

I want to perform from 1 to x
and i dont mean
if bal == 1 do
elseif bal == 2 do

I just wnat it in one line if bal >= 1 do

any idea?

Thanks

#88259 26/06/04 10:37 PM
Joined: Apr 2003
Posts: 701
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Apr 2003
Posts: 701
I suppose %Nick. [ $+ [ $chan ] $+ [ $nick ] ] contains the level you want triggered.
You can put the commands in a hash table with the level as item and the command as data
if (%Nick. [ $+ [ $chan ] $+ [ $nick ] ] >= N) {
if ($hget(levelhash,$ifmatch) $ifmatch
else kickban $nick $chan Level higher than I have commands for in my hashtable
}

You could also make a text file with on each line the command for that level (no numbers before it) and then use $read(commands.txt,p,level)
You could also use ini files with the format 1=command and then use $readini(commands.ini,p,commands,level)


Link Copied to Clipboard