mIRC Home    About    Download    Register    News    Help

Print Thread
#215285 10/09/09 06:24 PM
Joined: Feb 2005
Posts: 344
B
Fjord artisan
OP Offline
Fjord artisan
B
Joined: Feb 2005
Posts: 344
Hi there,

I got this aka script.
My question is is there a way to make this work better?
I think it sometimes misses a nick because i know the nick as some other nicks but the script doesn't.
Code:
ON *:START: {
  hmake trackusers 1000
  if ($isfile(trackusers.dat)) {
    hload trackusers trackusers.dat
  }
}

on *:JOIN:#: {
  if ($hget(trackusers,$address($nick,3))) {
    var %n = $ifmatch
    if ($istok(%n,$nick,38)) { var %d = $deltok(%n,$findtok(%n,$nick,1,38),38) }
    else { var %d = %n }
    if (!%d) { return }
    if ($window(@aka)) window @aka
    window -w1 +d @aka 0 0 1260 82
    aline @aka $timestamp $chan $+ 4 $nick 2 is also known as $iif($numtok(%d,32) > 1,:) 14 $+ %d
    if (!$istok(%n,$nick,32)) {
      hadd trackusers $address($nick,3) %n $nick
    }
  }
  else {
    hadd trackusers $address($nick,3) $nick
  }
}
on *:NICK: {
  if ($hget(trackusers,$address($newnick,3))) {
    var %n = $ifmatch
    if (!$istok(%n,$newnick,32)) {
      hadd trackusers $address($newnick,3) %n $newnick
    }
  }
  else {
    hadd trackusers $address($nick,3) $newnick
  }
}
menu nicklist {
  Track Users
  . View Other Nicknames: {
    if (!$address($$1,3)) { echo $colour(info) -ti2 # * IAL not updated for $$1 $+ , performing userhost lookup) | userhost $$1 | return }
    if ($hget(trackusers,$address($$1,3))) {
      var %n = $ifmatch
      if ($istok(%n,$$1,32)) { var %d = $deltok(%n,$findtok(%n,$$1,1,32),32) }
      else { var %d = %n }
      if (!%d) { goto notknown }
      echo $colour(info) -ti2 # * $$1 has also used the nickname $+ $iif($numtok(%d,32) > 1,:) %d
    }
    else {
      :notknown
      echo $colour(info) -ti2 # * $$1 has not been known by any other nickname
    }
  }
  .Reset:hdel trackusers $address($$1,3)
}
ON *:EXIT: {
  if ($hget(trackusers)) { hsave -o trackusers trackusers.dat }
} 

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
My experience with this type of script and the same (or similar) problem has shown to me that the problem lies in the address that is being used. In your case $address(<nick>,3)

If the person connects from a different location, or via a different method, then the returned address might not match the stored address, and, although you recognize the two nicks as being the same person, the script does not, due to the fact that the addresses don't match.

Regretfully I have not been able to come up with a solution that works 100%, but I do intend to keep trying, and if I get one that works, I will post it. Likewise, if you get one, I hope that you will post it so that I (and probably others) will be able to make use of the additional information.

Joined: Feb 2005
Posts: 344
B
Fjord artisan
OP Offline
Fjord artisan
B
Joined: Feb 2005
Posts: 344
Thanks RusselB


Link Copied to Clipboard