mIRC Home    About    Download    Register    News    Help

Print Thread
#74351 07/03/04 02:47 PM
B
bozghiyy
bozghiyy
B
I have a problem !
i made a script something like
On 1:notice:*:*:{
....
if ( $3 == [???] ) { /action }
else { /action2 }
....
}
but if the $3 is for example [100] it doesn't do /action it does /action2 , and if $3 !== [???] it does /action2 again !
what shoul i do ?

#74352 07/03/04 02:49 PM
Joined: Nov 2003
Posts: 2,321
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,321
if [???] iswm $3 { }

#74353 07/03/04 03:02 PM
Joined: Dec 2002
Posts: 1,253
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,253
If you are only looking for numbers within the [###] in $3, use a regex solution. smile
Code:
[color:green]
;  on *:NOTICE:*:*:{
;    if $regex($3, /\[\d{3}\]/) {
 [/color]
on $*:NOTICE:/^\S+ \S+ \[\d{3}\]/:*: action1
 [color:green]
;    }
;    else {
 [/color]
on *:NOTICE:*:*: action2
 [color:green]
;    }
;  }[/color]



Link Copied to Clipboard