My channel (not the one in my sig) uses a script I wrote long ago for tracking stats like that. It's rather inefficient in that it uses INI instead of Hash for storing data, but it works. I did it a long time ago when I didn't know about hash tables and since it works, I've never changed it. It tracks the following:

Per User:
Total lines
Total number of days since the first line was recorded
Lines per day (just total lines divided by number of days)
Rank overall for total number of lines
Number of smiles (with a couple dozen ways to smile)
Number of frowns (with a dozen or so ways to frown)
Number of laughs (with a dozen or so ways to laugh)
Random quote (just changes the quote if the person types a line at the right time)

Everyone:
Tracks what position everyone is in with regard to total number of lines. From first down to 200+ position. It prunes the data based on number of lines and lines per day settings that I have set up. That tends to keep it hovering around only 200 people in the ranking.

Commands:
!stats (see your stats other than lines/day & number of days)
!stats nick (same as above, but for someone else)
!linestat (see your stats for lines/day & number of days & rank)
!linestat nick (same as above, but for someone else)
!lines # (see !linestat info the the person ranked with the number entered... let's you see how many more lines to go up a rank)
!linerace (see the top10 "big mouths")

Oh, and the total lines typed doesn't count lines like !stats (how you see your stats), or other triggers that are used. It also won't count any advertisements.

Anyhow, it can easily be done. I won't bother sharing this stats scripting as it isn't well-written as I mentioned. It was one of the first scripts I wrote. Still works well, but really poor coding style.

The most interesting part of it is to see the trivia bot's lines... 5500+ per day for a total of over 2 million. laugh

*The bot isn't ranked for total lines (it's actually rank 0), so it's not in the top 10. It also doesn't track the smiles/frowns/laughs/quote because it's just trivia and doesn't need to.


Invision Support
#Invision on irc.irchighway.net