Easily used: /anick [nickname] [password]
It adds $1, the nickname, to an auto-identify hash table with $2, the password. Just paste in your remotes, and you're ready to go.
menu menubar {
Auto-Ident
.Add:{
var %x $?="Enter nickname:"
var %y $?="Enter password:"
if (%x) && (%y) { anick %x %y }
}
.-
.Del:{
var %x $?="Enter nickname to remove:"
if (%x) {
if ($hget($network $+ _nicks,%x)) {
hdel $network $+ _nicks %x
hsave -o $network $+ _nicks $network $+ _nicks.hsh
echo -a * %x now deleted from Auto-Ident list
}
}
}
.-
.List { anicklist }
}
alias anicklist {
if ($hget($network $+ _nicks)) {
if (!$window(@NickList)) {
window -lk0 @NickList
var %x = $hget($network $+ _nicks,0).item,%y = 1
if (%x > 0) {
while (%x) {
aline @NickList %y $+ 3] $hget($network $+ _nicks,%x).item 3( $+ $hget($network $+ _nicks,%x).data $+ 3)
dec %x
inc %y
}
}
else { window -c @nicklist }
}
}
}
alias anick {
if (!$1) { echo * /anick: insufficient parameters | halt }
if (!$2) { echo * /anick: insufficient parameters | halt }
$iif(!$hget($network $+ _nicks),hmake $network $+ _nicks)
$iif($exists($network $+ _nicks.hsh),hload $network $+ _nicks $network $+ _nicks.hsh)
if ($hget($network $+ _nicks,$1)) { echo * /anick: $1 already exists | halt }
hadd -m $network $+ _nicks $1 $2
hsave -o $network $+ _nicks $network $+ _nicks.hsh
echo * $1 now added to auto-ident list
}
on *:connect:{
if (!$hget($network $+ _nicks)) { hmake $network $+ _nicks }
if ($exists($network $+ _nicks.hsh)) { hload $network $+ _nicks $network $+ _nicks.hsh }
if ($hget($network $+ _nicks,$me)) { .msg Nickserv identify $hget($network $+ _nick,$me) }
}