mIRC Home    About    Download    Register    News    Help

Print Thread
#202876 01/08/08 01:27 PM
Joined: Jan 2008
Posts: 22
D
dassa Offline OP
Ameglian cow
OP Offline
Ameglian cow
D
Joined: Jan 2008
Posts: 22
Hi People
what is the most efficient and error free way to get the host from a servernotice. I place an example below.

[12:37:38] :irc.network.net NOTICE nick :*** Notice -- Client connecting on port 6667: nvcrawl (scrawl@thanatos.searchirc.com) [clients]

I want to get the @thanatos.searchirc.com out of the notice.

I tried messing with $gettok and got some sort of results but wonder if there is perhaps a good efficient way.

Thanks kindly

Joined: Oct 2005
Posts: 1,741
G
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
snotices usually follow an exact format so that scripts can parse them easily. For your example, something like this could work:

Code:

on *:SNOTICE:& & & client connecting on port *:{
  var %host = $remove($10,$chr(40),$chr(41)) 
  echo -a Nick: $9 Ident: $gettok(%host,1,64) Host: $gettok(%host,2,64) Server: $nick Port: $remove($8,$chr(58)) 
}



-genius_at_work


Link Copied to Clipboard