alias t1 {
var %rep 5
var %interval 61
if ($timer(post271666)) .timerpost271666 off | if ($hget(conn_ect)) hfree $v1
else {
; add your nicks to the variable %nicklist, space delimited
; ---------------------------------------------------------
var %nicklist specnick1 specnick2 specnick3 specnick4 specnick5
; ---------------------------------------------------------
; add nicklist to hashtable/item so we can work with it later
hadd -m conn_ect nicklist %nicklist
; setup the timer and fire/execute it immediately
.timerpost271666 -io %rep %interval conn_ect | .timerpost271666 -e
}
}
alias conn_ect {
var %server testnet.ergo.chat
var %port +6697
var %join #test271666
var %step 3
while (%step > 0) {
if (($hget(conn_ect)) && ($hget(conn_ect,nicklist))) {
; chop up nicklist, delimit on space - $chr(32)
tokenize 32 $hget(conn_ect,nicklist)
; grab the first nick off the list
var %nick $1
; save the remaining nicks in the hashtable/item
hadd -m conn_ect nicklist $2-
}
; if nicklist empty, fallback on creating a random nick
else var %nick $+(test,$base($rand(0,9999),10,10,4))
; an altnick might be handy to have, base it off %nick
var %altnick $+(%nick,_)
; connect to the server with the specified settings
server -m %server %port -i %nick %altnick -j %join
; dec the while loop
dec %step
}
}