
Chanstats v2.1 (7/4/99)                                    for eggdrop 1.3.2x
by Jafar <jafar@imtoosexy.com>
by Ernst <baschneo@trick.informatik.uni-stuttgart.de>
tested on eggdrop 1.3.x by Cron@irc.pl (http://www.misiek.eu.org)
===============================================================================

NOTE: The filenames have been shortened to less than 8 characters due to using a
      Microsoft installed PC to compress the files. Feel free to change the file
      names so that you understand them better.

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. (recompile eggdrop after installing)

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)
 - A 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

This version has been edited and updated to specifically use the new Binding in
Eggdrop's which appeared around the time of 1.3.21. It is unknown and has not been
tested to see if it will work on earlier versions. It is reccomanded that Version 2.0
is used if you are running a Eggdrop of an earlier version and 1.3.19 definately.

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 this list in later versions.

Some pages I have already seen (may not all be up anymore):
  #wariaci (IRCnet)        http://www.misiek.eu.org/wariaci/
  #brasil (Dalnet)         http://www.sodre.net/sodre/stats.htm
  #brasil (IRCnet)         http://dali.sti.com.br/~ernst/brasil/stats.htm
  #chatzone (?)            http://turbo.tudogs.net.au/~fid0/stats.html
  #darkinn (Efnet)         http://fremont.vegasnet.org/~parkerc/d.stats.html
  #newbies (Dalnet)        http://www.ecicnet.org/~bbbach/newbies-stats.htm
  #oasis (?)               http://arts2-pc042.leeds.ac.uk:8090/~ajgb/stats.html
  #osa (IRCnet)            http://hem.passagen.se/dw/chanstat/osa.htm
  #portugal (IRCnet)       http://dali.sti.com.br/~ernst/portugal/stats.htm
  #thecrystalcave (Newnet) http://206.20.42.89/stats.htm
  #thejyhad (Efnet)        http://fremont.vegasnet.org/~parkerc/j.stats.html

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

To install:
===========
 - Change the variables on the top of chanstats2.1.tcl to reflect your
   environment and wishes
 - 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

If the page gets old permissions (not accessible through the web) each time
they are generated, then you should use the "statsexec" definition to 'chmod
644' the files after they are created.  Add the following to the statsexec
definition:

   "exec /bin/chmod 644 /home/fred/public_html/stats.htm"

replacing the filename with your stats page.  Add this for each stats page
that is generated.

