mIRC Home    About    Download    Register    News    Help

Print Thread
#118323 24/04/05 02:59 PM
Joined: Apr 2005
Posts: 53
A
Babel fish
OP Offline
Babel fish
A
Joined: Apr 2005
Posts: 53
I need a script for DNS resolver. etc (public command) !dns HOST ;and the bot tries to resolve dns and reply it to the chan.

Thx laugh

#118324 24/04/05 03:06 PM
Joined: Feb 2005
Posts: 43
M
Ameglian cow
Offline
Ameglian cow
M
Joined: Feb 2005
Posts: 43
Well, I'm not sure if theres a better way to do it but..

Code:
on *:dns:{ msg [color:red]#channel[/color] $iif($dns(1).ip,Resolved $dns(1) to $dns(1).ip,Could not resolve) }
on *:text:!dns *:[color:red]#channel[/color]:{ dns $2 }
 


Check out http://kalsiddon.com for games, videos & more! Good for when your bored in work or school!
#118325 24/04/05 03:38 PM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Slight alteration to your code using groups and an alias.

Code:
on 1:Text:!DNS *:#Channel: { .enable #DNS | dns $2 | set %x $2 }

#DNS off
on *:dns: {
  $iif($raddress,chk resolved,chk notresolved) 
}
#DNS end

alias -l chk {
  if ($1 == resolved) { msg #channel Resolved $dns(1) to $raddress | .disable #DNS }
  if ($1 == notresolved) { msg #channel Couldn't resolve %x | .disable #DNS }
  unset %x
} 

#118326 24/04/05 03:40 PM
Joined: Feb 2005
Posts: 43
M
Ameglian cow
Offline
Ameglian cow
M
Joined: Feb 2005
Posts: 43
meh smirk


Check out http://kalsiddon.com for games, videos & more! Good for when your bored in work or school!

Link Copied to Clipboard