mIRC Home    About    Download    Register    News    Help

Print Thread
#190217 18/11/07 12:58 AM
Joined: Oct 2005
Posts: 827
P
pouncer Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: Oct 2005
Posts: 827
on $*:sockopen:/sock./:{
' do whatever
}

that is meant to trigger for socketnames like

sock.394545
sock.545454
rsock.45435435
rsock.45454554

etc..

but it is also triggering for this:
socklist.45435435
socklist.03839354

how can i stop it triggering the above 2 style socketnames?

Last edited by pouncer; 18/11/07 12:58 AM.
Joined: Oct 2005
Posts: 1,741
G
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
In regex, the . character means "any character". To use a literal . you must escape it like this: \.

on $*:SOCKOPEN:/sock\./:{

However, in this case, there is no reason to use regex. A simple wildcard would be sufficient.

on *:SOCKOPEN:sock.*:{

-genius_at_work

Joined: Oct 2005
Posts: 827
P
pouncer Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: Oct 2005
Posts: 827
what about rsock.45435435

Joined: Dec 2002
Posts: 503
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Dec 2002
Posts: 503
*sock.*


Link Copied to Clipboard