mIRC Home    About    Download    Register    News    Help

Print Thread
#41017 10/08/03 11:01 PM
Joined: Jul 2003
Posts: 132
O
Vogon poet
OP Offline
Vogon poet
O
Joined: Jul 2003
Posts: 132
hi again laugh,
okay helpers on this forum helped me with dns resolving and custom display BUT i have another bug.

when i do /dns nick it shows me
Nickname: i.e TrashMan
host: somehost.com
ip: 62.***.***.***

BUT when i just give /dns someip

it gives me
Nickname: - nothing here, blank no matter if user is on IRC
host: ip number
ip: ip number

how to solve this so under nickname it gives me back nickname and under host it gives me host not ip ?

#41018 11/08/03 12:02 AM
Joined: Dec 2002
Posts: 339
F
Fjord artisan
Offline
Fjord artisan
F
Joined: Dec 2002
Posts: 339
Probably the script you scripted with the help of the helpers here does have nickname: $1? laugh

#41019 11/08/03 12:07 AM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Try
Code:
on 1:DNS: {
  if ($raddress == $null) { echo 4 -a Can't resolve that DNS. }
  else {
    echo IP: $iaddress
    echo Address: $naddress
  } 
}

#41020 11/08/03 12:09 AM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Sorry, I didn't look at your whole post. I don't think that'd work because you could do a /dns on anything i.e websites etc. Even 127.0.0.1. What is 127.0.0.1's nickname?

#41021 11/08/03 12:10 AM
Joined: Jul 2003
Posts: 132
O
Vogon poet
OP Offline
Vogon poet
O
Joined: Jul 2003
Posts: 132
nothing changes

#41022 11/08/03 12:12 AM
Joined: Jul 2003
Posts: 132
O
Vogon poet
OP Offline
Vogon poet
O
Joined: Jul 2003
Posts: 132
heh, yeah , true it is, but still can it be done?

#41023 11/08/03 12:18 AM
Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
This is the script I use, edit it to display as you want it to:
Code:
on *:DNS:{
  echo -a -
  echo -a * $dns(0) results for $iif($iif($dns(0).nick,$ifmatch,$dns(0).addr),$ifmatch,$iaddress)
  var %r = 1
  while ( %r <= $dns(0) ) {
    echo -a * $iif($dns(%r).nick,Nick: $dns(%r).nick $str($chr(160),$calc(15 - $len($dns(%r).nick)))) IP: $dns(%r).ip $str($chr(160),$calc(16 - $len($dns(%r).ip))) Address: $dns(%r).addr
    inc %r
  }
  echo -a -
  haltdef
}

#41024 11/08/03 12:37 AM
Joined: Jul 2003
Posts: 132
O
Vogon poet
OP Offline
Vogon poet
O
Joined: Jul 2003
Posts: 132
okay, it is acceptable, but still how can i see nickname if i do /dns ip (not /dns nick) ??

#41025 11/08/03 12:44 AM
Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
Code:
on *:DNS:{
  echo -a -
  echo -a * $dns(0) results for $iif($iif($dns(0).nick,$ifmatch,$dns(0).addr),$ifmatch,$iaddress)
  var %r = 1
  while ( %r <= $dns(0) ) {
    var %n = $iif($dns(%r).nick,$ifmatch,$gettok($ial(*!*@ $+ $dns(%r).addr,1),1,33))
    echo -a * $iif(%n,Nick: $ifmatch $str($chr(160),$calc(15 - $len($ifmatch)))) IP: $dns(%r).ip $str($chr(160),$calc(16 - $len($dns(%r).ip))) Address: $dns(%r).addr
    inc %r
  }
  echo -a -
  haltdef
}


Link Copied to Clipboard