Have A slight glithc in my script - 06/01/06 05:35 AM
hi i have the following script:
it was designed to set off a trigger of 2 styles of fileserver ads, whcih triggers a seperate script.
the 2 ads r as follows
and
the first IF event is meant to trigger Fileserver type 2 and The 2nd IF Eveent, File Server Type 1
Currently the 2nd IF works perfectly how it is, howerver it is the First IF i had a problem with
as you can see i added echo's in there so you can see exactly what happens from the scripts pt of view
a
/ctcp My
b
now the script works fine except when a nick has a - in the name (i.e My-Books2) it doesnt read on.
Code:
on *:text:*:#mybooks:{ echo -a a if ($regex($strip($1-),/Triggers:\[(.*)\]/)) { var %cmd = $remove($gettok($regml(1),1,45),]) echo -a %cmd echo -a b if (/ctcp $nick * iswm %cmd) { echo -a c %cmd if (!$read(somefile.txt,w,$+(*,$nick,*))) { echo -a d write booktriggers.txt $nick $+ $chr(9) $+ %cmd } } } elseif ($regex($strip($1-),/Triggers:\«(.*)\»/)) { echo -a aa var %cmd = $remove($gettok($regml(1),1,187),») if (/ctcp $nick * iswm %cmd) { echo -a bb %cmd if (!$read(somefile.txt,w,$+(*,$nick,*))) { echo -a cc write booktriggers.txt $nick $+ $chr(9) $+ %cmd } } } }
it was designed to set off a trigger of 2 styles of fileserver ads, whcih triggers a seperate script.
the 2 ads r as follows
Code:
[04:27:48]pm <MY-Book1> File Server Online Triggers:« /ctcp MY-Book1 !trigger1 » Sends:«0/2» Queues:«0/10» Accessed:«6 times» Online:«0/4» RCPS:«0 cps by n/a» Served:«0B in 0 files» Current BW:«0 cps» AQT:«No Wait» MOTD: -= Invision 2.0 Build 1816
and
Code:
[04:29:50]pm <My-Book2> [Fserve Active] - Trigger:[/ctcp My-Book2 Gimme My Damn Books] - Users:[0/5] - Record CPS:[22.3kB/s by Matrix] - Files Sent:[4] - Accesses:[15] - Current Bandwidth:[45.4kB/s] - SysReset 2.53
the first IF event is meant to trigger Fileserver type 2 and The 2nd IF Eveent, File Server Type 1
Currently the 2nd IF works perfectly how it is, howerver it is the First IF i had a problem with
as you can see i added echo's in there so you can see exactly what happens from the scripts pt of view
a
/ctcp My
b
now the script works fine except when a nick has a - in the name (i.e My-Books2) it doesnt read on.