Join Counter (Nick Based)
Platform: mIRC
Published Mar 07, 2005
Updated Sep 19, 2005
An join counter that counts the number of unique nicknames joining the channel. When a nick joins the channel again, it will tell them how many times they have visited the channel. This will also tell them when they last visited the channel. Now uses hash tables & Multi-server capable.
on *:START: {
hmake jcount 100
if ($isfile(jcount.dat)) hload jcount jcount.dat
}
on *:EXIT: hsave -o jcount jcount.dat
on !*:JOIN:#: {
if ( $hget(jcount,$+($network,.,$chan,.,$nick)) ) {
tokenize 32 $v1
var %t = $calc($1 + 1)
.msg $chan Welcome Back $nick $+ . Last time you joined $chan was on $2 $+ , $duration($calc($ctime - $3)) ago $+ . (Your total visits: %t $+ )
hadd -m jcount $+($network,.,$chan,.,$nick) %t $asctime(mm/dd/yyyy) $ctime
}
else {
hinc -m jcount $+($network,.,$chan,.,total.count)
.msg $chan Welcome $nick $+ ! You're visitor $chr(35) $+ $hget(jcount,$+($network,.,$chan,.,total.count)) to join $chan $+ .
hadd -m jcount $+($network,.,$chan,.,$nick) 1 $asctime(mm/dd/yyyy) $ctime
}
}