; on join of a user: add to table "joins" for 180 seconds a random-named item with data "<connectionID>chr1<channel>chr1<nick>" .
on *:join:#: {
hadd -mu180 joins $rand(1,99999) $+($cid,$chr(1),$chan,$chr(1),$nick)
ECHO -a total No. of joins (all connections, all channels) (last 30s): $hget(joins,0).item
ECHO -a No. of joins on this connection $cid (last 30s): $hfind(joins, $+($cid,$chr(1),*) ,0,w).data
ECHO -a No. of joins on this connection $cid and this channel $chan (last 30s): $hfind(joins, $+($cid,$chr(1),$chan,$chr(1),*) ,0,w).data
ECHO -a No. of joins of the nick $nick on all connections (last 30s): $hfind(joins, $+(*,$chr(1),$nick) ,0,w).data
}