mIRC Home    About    Download    Register    News    Help

Print Thread
#21059 26/04/03 10:37 PM
Joined: Apr 2003
Posts: 5
2
24Seven Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
2
Joined: Apr 2003
Posts: 5
Hey peeps, ive tried for a while to work out this script. What i want is when a user of any level types !ip $nick for me to dns that nick and notice the user the result. Ive tried all the /help but im still pretty stuck. Heres what ive got so far its probably totally wrong though.

Code:
 on 1:TEXT:!ip *:#:/DNS $$2 


Code:
 ON *:DNS: {  if ( $raddress == $null ) {    echo $colour(info2) -ta DNS lookup was unsuccessful    halt  }  if ( $raddress != $null ) {    echo $colour(info2) -ta >The DNS lookup you requested is successful    if ($nick != $null) {      echo $colour(info2) -ta Nickname of DNS lookup:14 $nick    }    if ($nick == $null) {      echo $colour(info2) -ta Nickname of DNS lookup:14 Not applicable    }    echo $colour(info2) -ta Named address:14 $naddress    echo $colour(info2) -ta IP address:14 $iaddress    echo $colour(info2) -ta Resolved address:14 $raddress  }  haltdef} 


Thanks for any input!

#21060 26/04/03 11:36 PM
Joined: Dec 2002
Posts: 699
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 699
Well firstly, go back to the post where you found it, Here, and make it look the same as Watchdog posted instead of being all in one long line. smile
In the on text event, "/set %dns.nick $2"
Then in the on *:dns: event, check "if $dns(0).nick == %dns.nick" var that you set in the text event.

#21061 27/04/03 11:14 AM
Joined: Apr 2003
Posts: 5
2
24Seven Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
2
Joined: Apr 2003
Posts: 5
Code:
 on *:TEXT:!ip *:#:/set %dns.nick $2
ON *:DNS: {
  if ( $raddress == $null ) {
    echo $colour(info2) -ta DNS lookup was unsuccessful
    halt
  }
  if ( $raddress != $null ) {
    echo $colour(info2) -ta >The DNS lookup you requested is successful
    if ($nick != $null) {
      echo $colour(info2) -ta Nickname of DNS lookup:14 $nick
    }
    if ($nick == $null) {
      echo $colour(info2) -ta Nickname of DNS lookup:14 Not applicable
    }
    echo $colour(info2) -ta Named address:14 $naddress
    echo $colour(info2) -ta IP address:14 $iaddress
    echo $colour(info2) -ta Resolved address:14 $raddress
  }
  if $dns(0).nick == %dns.nick
}
haltdef
} 


Ok thanks for your input nimune. This is what its like now but im not getting any reaction from a users trigger, any ideas?

#21062 27/04/03 03:20 PM
Joined: Dec 2002
Posts: 699
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 699
Well, really that was an exercise in how NOT to copy/paste laugh
Now, on to the script you want.
Code:
on *:text:!ip &:#:{
  if $longip($ial($2).host) { msg # * DNS: $2 IP: $ial($2).host }
  else { set -u300 %dns. $+ $nick # | .dns $nick }
}
on *:dns:{
  if $dns(0).nick && $eval($+(%,dns.,$ifmatch),2) {
    var %a = $ifmatch
    if $dns(1).nick { msg %a * DNS: $ifmatch IP: $dns(1).ip }
    else { msg %a * Dns: $dns(0).nick Unsuccessful
  }
}

#21063 27/04/03 03:39 PM
Joined: Apr 2003
Posts: 5
2
24Seven Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
2
Joined: Apr 2003
Posts: 5
Thanks alot, i never would have gotten that on my own crazy Works a treat smile


Link Copied to Clipboard