Alias tracker (AKA)

By RusselB on Mar 16, 2007

Due to the high number of problems people encountered with the updated version of this script, I have deleted that version and reposted the original code. I do plan on bringing the code back to the level of the updated code regarding things like limiting the number of nicks tracked per address, and how/where the information is displayed, but I will be testing the code more thoroughly this time before posting.

Code updated to include a number of features that have been requested, both directly and indirectly.

For those of you who use the original code, the new one is 100% compatable with the storage method of the old code.

Added the following options:
1) Ability to turn on/off the echo when a person joins
2) Menu selection to see the aliased nicks
3) Option to limit number of nicks stored per address
4) Ability to ask in channel or via pm for the aliases for one or more nicks
5) Ability to send the command to show the aliases directly from the bot.

Removed limitation that occasionally did not set a nick to an address.

raw 366:*:{
  .who $2
}
raw 352:*:{
  .hadd -m AKA $4 $addtok($hget(AKA,$4),$6,32)
  if %aka.auto {
    echo 4 -t $2 $6 aka $replace($remtok($hget(AKA,$4),$6,1,32),$chr(32),$+($chr(44),$chr(32)))
  }
  if ($numtok($hget(AKA,$4),32) > $hget(AKA,0)) && ($v2 isnum 1-) {
    .hadd -m AKA $4 $gettok($hget(AKA,$4),2-,32)
  }
  haltdef
}
on *:nick:{
  var %a = $ial($nick,0)
  while %a {
    var %address = $ial($nick,%a)
    .hadd -m AKA %address $addtok($hget(AKA,%address),$newnick,32)
    if ($numtok($hget(AKA,%address),32) > $hget(AKA,0)) && ($v2 isnum 1-) {
      .hadd -m AKA %address $gettok($hget(AKA,%address),2-,32)
    }
    dec %a
  }
}
on *:exit:{
  .hsave -o AKA AKA.hsh
}
on *:disconnect:{
  .hsave -o AKA AKA.hsh
}
on *:start:{
  if !$hget(AKA) { .hmake AKA 100 }
  if $exists(AKA.hsh) { .hload AKA AKA.hsh }
}
ctcp *:version:*:{
  ctcpreply $nick Version Alias Tracker 01.02.2009 by Russel Bairstow
}
menu * {
  Auto-Display on join $iif(%AKA.auto,Off,On) : set %aka.auto $iif(%aka.auto,$false,$true)
  Number of nicks per address currently $iif($hget(AKA,0),limited to $v1,Unlimited) : limit
}
menu nicklist {
  Show alternative nicks : show $me show $iif($1,$1-,$$input(Space or comma separate multiple nicks,e,Enter nick(s) to be searched for))
}
alias -l limit {
  .hadd -m AKA 0 $$input(Use 0 for no limit,e,Maximum number of nicks per address,$iif($hget(0),$v1,0))
  var %a = $hget(AKA,0).item
  while %a {
    var %aka.address = $hget(AKA,%a).item
    if ($numtok($hget(AKA,%aka.address),32) > $hget(AKA,0)) && ($v2 isnum 1-) {
      .hadd -m AKA %aka.address $gettok($hget(AKA,%aka.address),$+($v1,-),32)
    }
    dec %a
  }
}
on *:text:*:*:{
  show $iif($chan,$chan,$nick) $1-
}
on *:input:*:{
  show $iif($chan,$chan,$me) $1-
}
alias -l show {
  var %aka.display = $1
  tokenize 32 $strip($2-)
  if !*show* iswm $1 {
    if !$2 {
      $iif(%aka.display ischan,.notice,.msg) $nick I need a nick to reference to find the known aliases (if any)    
    }
    else {
      var %aka.nicks = $replace($2-,$chr(44),$chr(32)), %a = 1, %b = $numtok(%aka.nicks,32)
      while %a <= %b {
        var %aka.nick = $gettok(%aka.nicks,%a,32), %c = $hfind(AKA,$+(*,%aka.nick,*),0,w).data, %aka
        while %c {
          var %aka.temp.nicks = $hget(AKA,$hfind(AKA,%aka.nicks,%c,w).data), %e = $numtok(%aka.temp.nicks,32)
          while %e {
            %aka = $addtok(%aka,$gettok(%aka.temp.nicks,%e,32),32)
            dec %e
          }
          dec %c
        }
        %aka = $remtok(%aka,%aka.nick,1,32)
        .msg %aka.display $iif(%aka,%aka.nick AKA $sorttok(%aka,32),No aliases for %aka.nick found)
      }
      inc %a
    }
  }
}

Comments

Sign in to comment.
datahawkee   -  Jun 21, 2011

@RusselB I can't seem to find anything to ask for aliaces in pm ? (win7, mirc 7.19)

I have:
Auto-Display on join On
Number of nicks per ....

 Respond  
RusselB   -  Mar 16, 2010

Please note that the option you are referencing is only available by right-clicking in a nicklist.

 Respond  
CaVeMaN   -  Mar 16, 2010

i did change $v1 for $ifmatch and $v2 for $ifmatch2 , mmm and then a click on "show alternative nicks" is not showing nothing ... .same problem Merkin ?

 Respond  
Jethro   -  Mar 06, 2010

Merkin_Man, if you happen to be using an older version of mirc below 6.16, you need to change > $v1to

$ifmatch

and> $v2to

$ifmatch2

They're the only culprit I can think of that render RusselB's script unworkable for you.

P.S. For whatever reason, there are still people adapting to the old versions of mirc. The old versions are full of unfixed bugs and holes security wise. One thing I do know, however, is that the old ones are easily cracked to bypass the registration.

 Respond  
Merkin_Man   -  Mar 05, 2010

I dont know what I did wrong but it doesnt work for me...I had a friend exit change names and re enter and i got nothing.....I right click name and select show alternate nicks and i get nothing...

 Respond  
RusselB   -  Mar 05, 2010

None. In fact the code that is currently posted here, and at http://www.hawkee.com/snippet/4697/ should be the same, and the same as the original code.

I did have an alternate code that I posted, but due to a lack of testing there were several problems that others encountered. With that information, I reverted back to the original code.

 Respond  
Merkin_Man   -  Mar 05, 2010

I was using an old version of your AKA and decided to update it so I erased the old one and added the new one....Now it doesnt seem to work.. Any ideas???

 Respond  
Pixyboo   -  Jan 21, 2010

.

 Respond  
RusselB   -  Jan 20, 2010

1) Open mIRC.
2) Press Alt+R (to open the Remote Editor)
3) If the page that opens isn't blank, Select File -> New
4) Copy & paste the code from here to the blank remote editor page
5) Click OK (in the remote editor) to save the file & close the page.

 Respond  
Pixyboo   -  Jan 20, 2010

.

 Respond  
RusselB   -  Jan 02, 2009

This is an updated code and has been tested to the best of my ability over the past week on 10 - 20 channels over 4 networks.
Please let me know if you run into any difficulties, and please be as precise as you can.

Note: There is a slight chance that one or more nicks may not be stored correctly if there is a lot of people that join a channel very quickly.

 Respond  
RusselB   -  Jul 19, 2008

Thanks Hawkee.

 Respond  
Hawkee   -  Jul 18, 2008

Russel, I\'ve disabled the part about the massive alteration so you can change it all you\'d like now.

 Respond  
RusselB   -  Jul 18, 2008

People have mentioned that they have had several problems with this code, so I tried to replace it with the original code. However, the software on this forum wouldn\'t allow me to make that large an alteration and forced a new post. Hawkee has been made aware of this situation and has said that he will look into it. If you have trouble with this code, the original can be found at http://www.hawkee.com/snippet/4697/

 Respond  
Lindrian   -  Jun 14, 2007

Alright. Thanks for clearing that out. Gave you a 8/10, my honest opinion about the script ;). Well done Russel.

And no problem, your welcome ;)

 Respond  
RusselB   -  Jun 13, 2007

The on start event has a check built into it to ensure compatability with past/future versions. This version uses a different format for storing the information, which makes it incompatable with previous versions. If you read the pop-up message, and had clicked Yes, then the script would\'ve continued, but any previous nicks/addresses that were stored would\'ve been lost. Clicking No is what causes the script to unload.

BTW: thanks for catching that typo...I\'ll fix the code.

 Respond  
Lindrian   -  Jun 13, 2007

Typo at:
echo 4 -a $nopath($scipt) will now unload due to compatability issues

$script, not $scipt

And i didnt quite get ur on start event, it wanted to unload, even tho i installed it today....

I dont knnow if im the only one experiencing it

 Respond  
Lindrian   -  Jun 13, 2007

I love this new version. I edited to my needs, regarding the echo\'s. Since it echos seperatley. Changed that :)

Otherwhize, tereffic work.

 Respond  
xDaeMoN   -  Jun 11, 2007

It saves the nick & it\'s address whenever they join or change nick. It will do an echo whenever a nick joins, that is if a previous nick was saved.

 Respond  
airfreshner   -  Jun 11, 2007

how do u track the nick on this script?

 Respond  
RusselB   -  Mar 27, 2007

An updated version has been submitted to the Add-Ons section.
Currently awaiting a review by someone other than myself.

 Respond  
RusselB   -  Mar 21, 2007

As I kept working on improving this, I kept thinking of other things I could add to improve it, so the update is taking longer than I thought. It\'s the 22nd now, and I don\'t have any plans for the weekend, so (hopefully) I\'ll be able to get everything done and posted for Monday (that\'s my goal at the moment)

 Respond  
Lindrian   -  Mar 18, 2007

Alright, thanks RusselB.

 Respond  
RusselB   -  Mar 18, 2007

The main idea of my code is to track the nicks used by a single person, and let you see what other nick(s) have been used. That being said, events like ON KICK, ON QUIT, etc., are useless. The nicks are tracked in a hash table, so the only time it has to be saved is when the client running the code leaves, which is covered in the ON EXIT and ON DISCONNECT events.

Those other scripts that have been mentioned that are bigger and have more events are usually scripts written for statistics, where you want to have a count of the number of kicks, bans, parts, joins, actions, messages, etc.

Regarding limiting the number of nicks in the list, I can definetely do that.

Watch for an update, probably within the next 24 hours.

 Respond  
Lindrian   -  Mar 17, 2007

Just though of a few stuff, what about making a alias to like /nick_check Nickname
and u get what nicks he used? And a menu, so ur rightclick a nick and check them.
And also, what about making a limit for the nicknames? Cause..

(12:20:36)Soushi AKA test2, test3, Test4, Test5

The list can be made long....

So, what about limiting it to, 5?, when it reaches that, i starts to delete the first one etc. Just, incase someone changes his nickname alot.

but a menu/alias would be perfect <3

 Respond  
Lindrian   -  Mar 17, 2007

There\'s a few of theese, this one doesnt look as \'advanced\' as the other ones,.
I havent tested this one, but the other ones are a little bigger.

But aint u able to make a few more events? like on kick, quit, disconnect, so it saves all users. Iunno, i saw Darth used that in his. Might be good to use it here too ;)

Anyhow, good job.

 Respond  
Noutrious   -  Mar 17, 2007

Nice! I had something like this, just bot version and using ini`s :)

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.