mIRC Home    About    Download    Register    News    Help

Print Thread
#6252 12/01/03 11:53 AM
Joined: Jan 2003
Posts: 3
P
Self-satisified door
OP Offline
Self-satisified door
P
Joined: Jan 2003
Posts: 3
Hello,

I tried to figure out how to show /dns $$1 in the active window but couldn't get it straight.. it always shows up in the status window, can I relay it from there? If so.. how? (tried it with echo -a but it doesn't execute /dns then)

Thanks in advance.

#6253 12/01/03 12:30 PM
Joined: Dec 2002
Posts: 774
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Dec 2002
Posts: 774
/help on dns


Code:
//if ( khaled isgod ) echo yes | else echo no
#6254 12/01/03 12:40 PM
Joined: Jan 2003
Posts: 3
P
Self-satisified door
OP Offline
Self-satisified door
P
Joined: Jan 2003
Posts: 3
uh, thanks wink

#6255 12/01/03 01:17 PM
Joined: Dec 2002
Posts: 145
G
Vogon poet
Offline
Vogon poet
G
Joined: Dec 2002
Posts: 145
on *:DNS: {
echo 12 -a *** Looking up $address
if ($raddress == $nul) {
echo 4 -a *** Unable to resolve $address
}
else {
echo 12 -a *** Resolved $address to $raddress
}
}

I'm not using "haltdef" since it doesn't stop "Looking up $address" to show up in the status window.

Therefore the default reply will still show up in the status window while the script will show up in the active window.

#6256 12/01/03 01:49 PM
Joined: Dec 2002
Posts: 2,985
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 2,985
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
}
gemeau50: You can stop the "Looking up" bit with this alias...
dns .dns $1

#6257 12/01/03 04:39 PM
Joined: Dec 2002
Posts: 1,321
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,321
Picture me being anal. :tongue:
Code:

on *:DNS:{
  echo $colour(info2) -ati2 The DNS lookup you requested was $iif($raddress,successful.,unsuccessful.)
  if (!$raddress) halt
  echo $colour(info2) -ati2 Nickname of DNS lookup:14 $iif($nick,$nick,Not applicable.)
  echo $colour(info2) -ati2 $+(Named address:,$iif($raddress == $naddress,),14) $naddress
  echo $colour(info2) -ati2 $+(IP address:,$iif($raddress == $iaddress,),14) $iaddress
  echo $colour(info2) -ati2 Resolved address:14 $raddress
  halt
}

No functional changes. I just had to put in my $0.02 worth. There was nothing wrong with Watchdog's code. It would work exactly the same as this version of it. I just cut out 10 lines of code. I couldn't help myself. :tongue:

Here's what I personally use:
Code:
alias DNS .dns $1
on *:DNS:{
  if ($raddress) echo $color(action) -eati2 * DNS $&
    $+($iif($nick,$+([Nick: $nick,])), $&
    $iif($iaddress,$+([IP: $iif($raddress == $iaddress,$+($chr(31),$iaddress,$chr(31)),$iaddress),])), $&
    $iif($naddress,$+([Named: $iif($raddress == $naddress,$+($chr(31),$naddress,$chr(31)),$naddress),])))
  else echo $color(ctcp) -eati2 * / $+($chr(31),DNS $nick $iaddress $naddress $raddress $chr(31)) - Lookup failed. 
  halt
}


DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C
#6258 12/01/03 05:34 PM
Joined: Dec 2002
Posts: 2,985
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 2,985
Actually the good old exclamation mark is a good idea, thanks for sharing.

#6259 13/01/03 02:39 AM
Joined: Dec 2002
Posts: 145
G
Vogon poet
Offline
Vogon poet
G
Joined: Dec 2002
Posts: 145
Tx.


Link Copied to Clipboard