This script can auto-ghost people who either join or change nicks to one that you own.
Syntax: /ghost <add/del> [pass]
If you're adding, you need the pass. If you're deleting one, you just need the nick.
Took me a long time to figure out how to use the $findtok, $gettok, and $remtok together, so please comment!
on !*:JOIN:#: {
if ($istok(%Nicks,$nick,32)) {
msg nickserv ghost $nick $gettok(%pass,$findtok(%Nicks,$nick,32),32)
}
}
on !*:NICK: {
if ($istok(%nicks,$newnick,32)) {
msg nickserv ghost $newnick $gettok(%pass,$findtok(%Nicks,$newnick,32),32)
}
}
alias ghost {
if ($1 == add) {
if (!$2 || !$3) { echo -a Please supply a nick and pass }
elseif ($istok(%nicks,$2,32)) { echo -a Nick already in list }
else { set %nicks $addtok($2,%nicks,32) | set %pass %pass $3 }
}
if ($1 == del) {
if (!$2) { echo -a Please supply a nick }
elseif (!$istok(%nicks,$2,32)) { echo -a Nick Not Found }
else { set %pass $remtok(%pass,$gettok(%pass,$findtok(%Nicks,$2,32),32),1,32) | set %nicks $remtok(%nicks,$2,32) }
}
if ($1 == view) {
var %i = 1, %x = $numtok(%nicks,32), %p
while (%i <= %x) {
%p = %p (Nick: $gettok(%nicks,%1,32) Pass: $gettok(%pass,%1,32) $+ )
inc %i
}
echo -a %p
}
}