Seen nick script
Platform: mIRC
Published Mar 10, 2010
Updated Mar 21, 2010
Paste to remote (ALT + R)
Seen nick script uses hash table to store nicks used by certain address. When user joins, script returns nicks used before with that address. If nick is already added in table, it will remove it, than overwrite it again, to avoid duplicated items.
Can be used with all versions of mIRC which supports hash tables.
Script suggested by: jecket
Thanks on your suggestions.
Written at: 11 March 2010 00:45
Update 1#: 11 March 2010 13:36
* Added NICK event for tracking newnick when nick is changed.
Update 2#: 13 March 2010 23:03
* Added options to show nicks when nick is changed.
* Added $numtok to join and nick events in echo function to show number of used nicks.
Update 3#: 14 March 2010 14:56
* Added statement to not show echo command when you change nick
Update 4#: 22 March 2010 01:53
* Added /seen nickname alias - Suggested by ericfx
* Fixed several bugs
on *:JOIN:#: {
if $hget(seen_nick) == $null { hmake seen_nick 10000 }
hadd seen_nick $address($nick,0) $+($remtok($hget(seen_nick, $address($nick,0)), $nick, 32), $chr(32), $nick)
if $numtok($hget(seen_nick, $address($nick,0)), 32) > 1 && $numtok($hget(seen_nick, $address($nick,0)), 32) =< 30 {
echo $chan $timestamp -- $nick used these nicks earlier: $remtok($hget(seen_nick, $address($nick,0)), $nick, 32) - Nicks: $calc($numtok($hget(seen_nick, $address($nick,0)), 32) - 1)
}
}
on *:NICK: {
if $address($newnick,0) != $null {
hadd seen_nick $address($newnick,0) $+($remtok($hget(seen_nick, $address($newnick,0)), $newnick, 32), $chr(32), $newnick)
}
if $numtok($hget(seen_nick, $address($newnick,0)), 32) > 2 && $numtok($hget(seen_nick, $address($newnick,0)), 32) =< 30 && $address($newnick,0) != $null && $newnick != $me {
var %.c 1
while $comchan($newnick,0) >= %.c {
echo $comchan($newnick,%.c) $timestamp -- $newnick used these nicks earlier: $remtok($remtok($hget(seen_nick, $address($newnick,0)), $newnick, 32), $nick, 32) - Nicks: $calc($numtok($hget(seen_nick, $address($newnick,0)), 32) - 2)
inc %.c
}
}
}
alias seen {
if !$1 { echo $color(action) * /echo: insufficient parameters }
else {
echo $active $timestamp -- $1 used these nicks earlier: $remtok($hget(seen_nick, $address($1,0)), $1, 32) - Nicks: $calc($numtok($hget(seen_nick, $address($1,0)), 32) - 1)
}
}