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
}
}
@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 ?
@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
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!
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.