
Chanstats v1.2 (6/6/97)                                       for eggdrop 1.0
by Ernst <baschneo@trick.informatik.uni-stuttgart.de>
===============================================================================

NOTE: Chanstats needs at least TCL version 7.6! If you are running 7.4,
      I recommend upgrading to the latest stable version, 7.6pl2, avaliable
      at ftp://ftp.sunlabs.com/pub/tcl.

Chanstats will write a HTML page containing several stats from any number of
channels your egg-bot sits in.  The stats generated in this version are: (more
ideas welcome)

 - Current channel topic and who set it
 - Active bans on channel, creators and comments
 - How many users are on the channel (bots, ops, voiced and normal users)
 - An attractive graph showing the channel today's usage hour by hour
 - Peak usage of the channel that day
 - Acummulated stats for today (joins, parts, kicks, nick changes, splits etc)
 - Bot uptime, time connected to server and time bot is in channel

The page is by default updated each 5 minutes.

The script is commented, so changes can be done easily.  If you do change
something, *please let me know*.

See example outputs at: http://dali.sti.com.br/~ernst/portugal/stats.htm and
http://dali.sti.com.br/~ernst/brasil/stats.htm.  If you have put the thing to
run on your bot, let me know the address of the page that is generated, so I
can take a look at it and include it in a list in later versions.

Some pages I have already seen:
 #brasil (IRCnet)    http://dali.sti.com.br/~ernst/brasil/stats.htm
 #newbies (Dalnet)   http://www.ecicnet.org/~bbbach/newbies-stats.htm
 #oasis (?)          http://arts2-pc042.leeds.ac.uk:8090/~ajgb/stats.html
 #portugal (IRCnet)  http://dali.sti.com.br/~ernst/portugal/stats.htm

===============================================================================

To install:
===========
    - Change the variables on the top of chanstats1.2.tcl to reflect your
      environment
    - Add the script to your bots config to be loaded on start
    - Copy all the gif's from the 'images' directory to the same directory where
      the stats page will reside
    - Do a 'chmod 644 *.gif' in that dir so they become accessible through www
    - .rehash the bot, and things should start auto-magically in 2 minutes
    - If the page is not accessible, 'chmod 644' it after it is created once


Versions:
=========

1.0 (23/5/97):
    - initial public release

1.1 (30/5/97):
    - fixed bug when channel is not the bots primary channel
    - fixed bug when channels name has uppercase chars
    - fixed bug 'can't read "chan": no such variable' when bot is not in the
      channel
    - fixed bug 'list element in braces followed by "," instead of space' when
      there is a {} or [] in a users nick
    - checks for TCL 7.6 support before running (clock & file functions)
    - NEW: added configuration option 'statsbotsalone' to choose between
           separating bots in stats or to threat them as normal users
    - NEW: now correctly lists ALL bans on a channel (global/channel specific,
           and those not set by bot)
    - NEW: usage graph now comes with a scale (wow!)

1.2 (6/6/97):
    - fixed bug introduced in 1.1 (not making page for primary channel)
    - now any channel name is lower-cased everywhere before processing, this
      probably makes everything work as expected
    - usage stats used to be rounded down, now rounds correctly
    - NEW: 'set statsgif': usage graph now avaliable with nice gifs
    - NEW: 'set statsexec': allows to specify commands to be executed after
           the stats pages are generated (for example to upload them to another
           server).  May be any tcl command (including 'exec xxx').
    - NEW: Also includes 'voiced' users in stats outputs
    - NEW: New statistic: peak usage of the channel that day
    - NEW: New statistic: time connected to server and time in channel
    - NEW: Cool chanstats logo :)


TO-DO/IDEAS:
============
    - get rid of all [clock]'s for TCL 7.4's sake (why don't you all upgrade??)
    - collect data and generate weekly/monthly (/yearly?) reports
    - stats about origin of users (domains)
    - allow to generate a text file instead of a html file with the stats
    - some kind of dcc interface to access the stats
    - drink less coca cola and do more for my study :)

