nick tracker

By cessil on Nov 23, 2009

this script will record the nicks and log them to a hash file.

When a user either changes a nick or joins a channel with a different nick it will write it to a hash file providing that that nick is not already in the file.

Use /clones to pull up previous/current nicks used by that user, this also works if you provide an address or ident.

if you had my older script that saved them as individual inis you can use the /transfer command to convert them into the has files.

on *:start: {
  hmake addresses 100
  hmake names 100
  hload addresses $mircdir $+ addresses.data
  hload names $mircdir $+ names.data
}
on *:EXIT: {
  hsave addresses addresses.data
  hsave names names.data
}
on *:join:#: {
  var %add $remove($address($nick,2),*,.)
  if (%add == $null) { halt }
  if ($hfind(addresses, %add, 0, M) == 1) {
    if ($nick == $hget(addresses, %add)) || (~ $+ $nick isin $hget(addresses, %add)) || ($nick $+ ~ isin $hget(addresses, %add)) { halt }
    if ($numtok($hget(names, %name),$asc(~)) < 15) {
      var %addthis $hfind(addresses, %add, 1, M) $hget(addresses, %add) $+ ~ $+ $nick
      hdel addresses $hfind(addresses, %add, 1, M)
      hadd -m addresses %addthis
    }
  }
  if ($hfind(addresses, %add, 0, M) == 0) {
    hadd -m addresses %add $nick
  }
  var %name $remove($gettok($address($nick,0),1,$asc(@)),*,!)
  if (%name == $null) { halt }
  if ($hfind(names, %name, 0, M) == 1) {
    if ($nick == $hget(names, %name)) || (~ $+ $nick isin $hget(names, %name)) || ($nick $+ ~ isin $hget(names, %name)) { halt }
    if ($numtok($hget(names, %name),$asc(~)) < 15) {
      var %addthis $hfind(names, %name, 1, M) $hget(names, %name) $+ ~ $+ $nick
      hdel names $hfind(names, %name, 1, M)
      hadd -m names %addthis
    }
  }
  if ($hfind(names, %name, 0, M) == 0) {
    hadd -m names %name $nick
  }
}
on *:nick: {
  var %add $remove($address($newnick,2),*,.)
  if (%add == $null) { halt }
  if ($hfind(addresses, %add, 0, M) == 1) {
    if ($newnick == $hget(addresses, %add)) || (~ $+ $newnick isin $hget(addresses, %add)) || ($newnick $+ ~ isin $hget(addresses, %add)) { halt }
    var %addthis $hfind(addresses, %add, 1, M) $hget(addresses, %add) $+ ~ $+ $newnick
    hdel addresses $hfind(addresses, %add, 1, M)
    hadd -m addresses %addthis
  }
  if ($hfind(addresses, %add, 0, M) == 0) {
    hadd -m addresses %add $newnick
  }
  var %add $remove($address($newnick,2),*,.)
  if (%add == $null) { halt }
  if ($hfind(addresses, %add, 0, M) == 1) {
    if ($newnick == $hget(addresses, %add)) || (~ $+ $nick isin $hget(addresses, %add)) || ($nick $+ ~ isin $hget(addresses, %add)) { halt }
    var %addthis $hfind(addresses, %add, 1, M) $hget(addresses, %add) $+ ~ $+ $nick
    hdel addresses $hfind(addresses, %add, 1, M)
    hadd -m addresses %addthis
  }
  if ($hfind(addresses, %add, 0, M) == 0) {
    hadd -m addresses %add $nick
  }
  var %name $remove($gettok($address($newnick,0),1,$asc(@)),*,!)
  if (%name == $null) { halt }
  if ($hfind(names, %name, 0, M) == 1) {
    if ($nick == $hget(names, %name)) || (~ $+ $nick isin $hget(names, %name)) || ($nick $+ ~ isin $hget(names, %name)) { halt }
    var %addthis $hfind(names, %name, 1, M) $hget(names, %name) $+ ~ $+ $nick
    hdel names $hfind(names, %name, 1, M)
    hadd -m names %addthis
  }
  if ($hfind(names, %name, 0, M) == 0) {
    hadd -m names %name $nick
  }
  var %name $remove($gettok($address($newnick,0),1,$asc(@)),*,!)
  if (%name == $null) { halt }
  if ($hfind(names, %name, 0, M) == 1) {
    if ($newnick == $hget(names, %name)) || (~ $+ $newnick isin $hget(names, %name)) || ($newnick $+ ~ isin $hget(names, %name)) { halt }
    var %addthis $hfind(names, %name, 1, M) $hget(names, %name) $+ ~ $+ $newnick
    hdel names $hfind(names, %name, 1, M)
    hadd -m names %addthis
  }
  if ($hfind(names, %name, 0, M) == 0) {
    hadd -m names %name $newnick
  }
}
alias clones {
  if ($1 == $null) { msg $1 use !clones <nick/address> | halt }
  var %add $remove($address($1,2),*,.)
  if ($1 !ison $chan) { var %add !@ $+ $remove($1,*,.,!,@) }
  if (%add == $null) && ($1 ison $chan) { w $1 | timer 1 5 clones $1 | echo -a please wait... | halt }
  if ($hfind(addresses, %add, 0, M) == 0) {
    if ($address($1,2) != $null) { echo -at 4Address Search. No clones recorded from $address($1,2) }
    if ($address($1,2) == $null) { echo -at 4Address Search. No clones recorded from $1 }
  }
  if ($hfind(addresses, %add, 0, M) == 1) { 
    if ($address($1,2) != $null) { echo -at 11Address Search from $address($1,2) 9 $+ $replace($hget(addresses, %add),~,$chr(32)) }
    if ($address($1,2) == $null) { echo -at 11Address Search from $1 9 $+ $replace($hget(addresses, %add),~,$chr(32)) }
  }
  var %name $remove($gettok($address($1,0),1,$asc(@)),*,!)
  if ($numtok($hget(names, %name),$asc(~)) > 15) { echo -at 4name list too long | halt }
  if ($1 !ison $chan) { var %name $remove($1,*,.,!,@) }
  if ($hfind(names, %name, 0, M) == 0) { echo -at 4Ident Search. No clones recorded from %name }
  if ($hfind(names, %name, 0, M) == 1) { echo -at 11Ident Search from %name 9 $+ $replace($hget(names, %name),~,$chr(32)) }
}
alias transfer {
  var %ll $findfile($mircdir $+ addresses,*,0)
  while (%ll > 0) {
    var %files $findfile($mircdir $+ addresses,*,%ll)
    var %gg $lines(%files)
    while (%gg > 0) {
      var %add $remove($gettok(%files,8,$asc(\)),.ini)
      if (nicks= isin $read(%files,%gg)) {
        if ($hfind(addresses, %add, 0, M) == 1) {
          var %addthis $hfind(addresses, %add, 1, M) $hget(addresses, %add) $+ ~ $+ $remove($read(%files,%gg),nicks=)
          hdel addresses $hfind(addresses, %add, 1, M)
          hadd -m addresses %addthis
        }
        if ($hfind(addresses, %add, 0, M) == 0) {
          hadd -m addresses %add $remove($read(%files,%gg),nicks=)
        }
      }
      dec %gg
    }
    dec %ll
  }
  var %ll $findfile($mircdir $+ names,*,0)
  while (%ll > 0) {
    var %files $findfile($mircdir $+ names,*,%ll)
    var %gg $lines(%files)
    while (%gg > 0) {
      var %add $remove($gettok(%files,8,$asc(\)),.ini)
      if (nicks= isin $read(%files,%gg)) {
        if ($hfind(names, %add, 0, M) == 1) {
          var %addthis $hfind(names, %add, 1, M) $hget(names, %add) $+ ~ $+ $remove($read(%files,%gg),nicks=)
          hdel names $hfind(names, %add, 1, M)
          hadd -m names %addthis
        }
        if ($hfind(names, %add, 0, M) == 0) {
          hadd -m names %add $remove($read(%files,%gg),nicks=)
        }
      }
      dec %gg
    }
    dec %ll
  }
}

Comments

Sign in to comment.
ZoMb1eRaBb1tT   -  Oct 09, 2012

this is what i get /echo: insufficient parameters (line 808, faveblah)

 Respond  
datahawkee   -  Jun 21, 2011

@cofvempire no problem , I was using "address and nick database" snippet for years , with my new pc win7 and mirc 7.19 , it stopped working, well I am here trying new snippets :) thanks

 Respond  
cofvempire   -  Jun 21, 2011

@datahawkee there r more nicktracker scripts on hawkee just look for nick tracker :)
and srr didnt know if you fully understood the topic, thats why the last sentence. my bad :)

 Respond  
datahawkee   -  Jun 21, 2011

@cofvempire According to the snippet description and name it should be able to do both ? I think he went off and cam with new one... , anyway I am looking to find a replacement for one snippet that tracked nicks accross many days or more if still using same address, I didn't get your last sentence, why would I expect results if he doesn't change nick ?

 Respond  
cofvempire   -  Jun 21, 2011

@datahawkee
did that person logged in with more then 1 nick? or loggd off and on with a different nick?
if that person comes on with the same nick everytime you don't see anything else.

 Respond  
datahawkee   -  Jun 21, 2011

Doesn't work for me (win7 micr 7.19) , I restarted mirc just to make sure, once "AKA Nick Tracker" reported a clone I used this one the person and I got nothing.

I made sure AKA Nick Tracker was reporting something that happened recently after loading "nick tracker"

 Respond  
cofvempire   -  Nov 27, 2010

@dragon_985 and arianna_peters => Use /clones <nick/adress >to pull up previous/current nicks used by that user, this also works if you provide an address or ident

like this => /clones cofvempire
and then u get this back:

Address Search from !@X.X.X.X cofvempire
Ident Search from cof cofvempire

or put this in (above that script), so it works with the rightclickmenu also:

menu * {
  nicktracker
  .click it:/clones $1
  .fill it:/clones $$?="what nick/address are you searching for?:"
}

the click it part is to click on the nick and it shows what it has logged.
the fill it part is where you can put a nick or address in if that nick isnt online and you want to know what other nicks r used by them

 Respond  
dragon_985   -  Nov 26, 2010

Hello :)
I am bit new to Mirc. I copied the script how to proceed with tracking nick?
Some people keep coming in new name and keep disturbing me.
Thanks In Advance

 Respond  
arianna_peters   -  Oct 24, 2010

I have copied your nick tracker script to my Remote as you indicated. But now (feeling really stupid) I have no idea what to do. From what I understand, when someone on my notify (or in a channel list) leaves irc, what do I do in order to see what nick they are switching to or even what nicks they have used in the past? Please help with this. thanks!

 Respond  
Jethro   -  Mar 24, 2010

I was talking about this line:> if ($hfind(addresses, %add, 0, M)Where M is not a switch. (the capitalized M)
For example, for a text event to match its item and data:

hadd -m table *word* reason
if ($hfind(table,$1-,1,W)) msg # word matches $v1 $+ , and its reason is: $hget(table,$v1)

This is a quick mock-up of a code of what I mean, for specific function of the correct switches, you should study them and find out how they work.

 Respond  
cessil   -  Mar 23, 2010

actually in the mirc help it says

The -m switch makes /hadd create the hash table if it doesn't already exist.

it only uses var and not set so the variables disappear when the script finishes because they are no longer needed so I don't actually understand your point of view.

 Respond  
Jethro   -  Mar 19, 2010

You may need to work on or rework your hash tables. The M is not a switch but to indicate that n, w, W, r, or R are the ones you should use. And you could have done it all within the scope of hash tables without affixing them to variables and the nick identifiers for reference purposes.

 Respond  
cessil   -  Mar 19, 2010

try restaring mirc

 Respond  
CaVeMaN   -  Mar 15, 2010

Im getting this error on my status ..how i cane fix this

  • Invalid format: $hfind (line 27, script5.mrc)
 Respond  
CaVeMaN   -  Mar 15, 2010

I have this error .. * Invalid format: $hfind (line 27, script5.mrc)...
how i cane fix this

 Respond  
Ghost-writer   -  Nov 28, 2009

woah o.o... nice.. 8/10

 Respond  
cessil   -  Nov 28, 2009

all done, it's working for me, but this is my first hash table.

 Respond  
Hamed Crow   -  Nov 27, 2009

Excellent :)

 Respond  
cessil   -  Nov 27, 2009

I'll try learning about hash tables and make a script to convert all the inis into a hash file.

 Respond  
Hamed Crow   -  Nov 27, 2009

Cessil: I read the first comment and it's my advice too.

Learn about it, it's MUCH MORE easier.
Also, it allows a better readability of your code.

 Respond  
cessil   -  Nov 24, 2009

I don't know how to make hash, and don't want to right now plus I've been running it for awhile now and the folders are only 183kb

 Respond  
Ghost-writer   -  Nov 24, 2009

A hash table would of been better than making 100 inis :>

 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.