Hash tables aren't really much more complicated than INI files.
1) Make the table (best with ON START... alternatively, use /hload with ON START)
/hmake Stats 10
2) Add your data
/hadd Stats <Nick> <Joins> <Parts> <Quits> <Other data>
3) Read your data
//echo -a $hget(Stats,Nick).data
4) Separate your data as needed (necessary if you are using more than just joins in the stats)
//echo -a $gettok($hget(Stats,Nick).data,x,32)
[Replace "x" with whatever item of data you're trying to get information on... in #2 above, 1 would be Joins, 2 would be Parts, 3 would be Quits, etc]
Note that you probably also want to look into saving/loading the hash table:
/hsave
/hload
Example way to increment joins:
on *:join:#: {
if ($hget(Stats,$nick) != $null) {
hadd Stats $nick $calc($gettok($hget(Stats,$nick).data,1,32) + 1) $gettok($hget(Stats,$nick).data,2-,32)
}
else {
hadd Stats $nick 1
}
}
This would just increment your joins (if joins is the first item in the table).