   ____ _   _    _  _____    _        _
  / ___| | | |  / \|_   _|__| |_ __ _| |_ ___
 | |   | |_| | / _ \ | |/ __| __/ _` | __/ __|
 | |___|  _  |/ ___ \| |\__ \ || (_| | |_\__ \
  \____|_| |_/_/   \_\_||___/\__\__,_|\__|___/
               3.0 by Baerchen, September 2001
                  for eggdrop 1.4.x+ & TCL 8.3
                     baerchen@germany-chat.net

CONFIGURATION
*********************************************************************

IMPORTANT: This script was designed for TCL 8.3.x. Don't run it with
earlier versions of TCL since it can crash your bot (though I'm not
sure about 8.2.x).

set cs(workdir) "/usr/home/bla/mybot/putallfileshere/"
Directory where CHATstats looks for the files it reads and writes
(data files, templates) Leave leading and trailing /'s as shown. Path
should not contain any dots "."

set cs(trigger) "."
This defines what char has to be used in front of a channel command.
"" is a valid option.

set cs(idle) 300
CHATstats counts people's idle seconds. Set this to what you consider
to be idle. Set to 0 to count each and every idle second. Set to a
very high value (like 100000000) to virtually disable this feature.

set cs(trimlimit) 0
After a time, the array holding the data gets spammed with dozens
of users counting only a few words (flyby's). They play only a
minor role for the CHATstats and would get deleted at 0600
(bot-time). Set to whatever or to 0 to disable this feature (50
turned out to be a good value for medium-frequency channels)

---

set cs(global) {

Here we start with the global configuration. Explanation:
The global configuration represents the default settings for all
channels where CHATstats is enabled. The global config includes all
settings the script offers. In opposite, if you need different
settings for a channel, you will need to create a channel specific
variable that contains only the changed settings. These settings will
override the global ones. We'll see later, here's the global config
first (note the different notation):

post=2
All info can be posted via 
0 = Don't post anything, tell users to visit the channel's website
1 = PRIVMSG to the channel
2 = NOTICE to the user
3 = MSG to the user
Getting info MSG'ed is very annoying and prevents users from calling
info too often while NOTICE seems to be the least spamming way.

timebalance=+0
Is your channel German and your bot resides on a server in the US?
Then all shown times (e.g. activity stats) refer to the US time,
which is probalby not what you want. People would see that there
is highest activity in your chnnel at 1500 when it's 2100 in
reality. So, you would set timefactor to +6. Vice versa, you would
set timefactor to -6.

adinterval=0
Want to advertize your website in the channel? Set this to the amount
of minutes after which CHATstats informs the chan about the website.
Set to 0 to disable.

adsite=http://www.yoursitehere.com
Set the website to be advertised (url only!)

update=60
Defines if and after how many minutes the webpages get updated.
Setting this variable to 0 creates no webpage at all. This is needed
when the script shall be limited to IRC only.

htmsuffix=.htm
Set the suffix for the webpages to be created

ulmethod=1
0 = do nothing, leave the webpages in $cs(workdir)
1 = move webpages to local folder
2 = upload webpages via FTP

If you set ulmethod to 1 (otherwise disregard):

localfolder=/usr/home/bla/public_html/subdir/
Set to full path where the files should be moved to. Leave leading
and trailing /'s as shown.

If you set ulmethod to 2, configure the next 5 variables (otherwise
disregard):

ftpname=www.myftp.com
Set to name of the FTP-server - do not include any subdirectories.

ftpport=21
Set the port of the FTP server (usually 21).

ftpfolder=/subdir/subdir/subdir/
Set to subdir, where the HTMLs should be FTP'ed to including leading
and trailing /'s as shown. Important: Set to nothing if not required.

username=username
password=password
Set username and password for the FTP given above (Note: for security
reasons, you should chmod 600 chatstats.tcl)
}
---

Done. If that's OK for (all) your channel(s), stop here and install.
If you need one or more different settings for one or more channels,
you need to insert the following into the script:

set cs(#channelname) {
setting=value
}

Here you put all settings that are different from the global
config. Do not use uppercase letters for #yourchannel. E.g., if
#foobar's webpages need to be uploaded to a different server than
all other webpages (as given in cs(global)), you would do this:

set cs(#example) {
 ulmethod=2
 update=60
 ftpname=www.myotherftp.com
 ftpfolder=/mydir/
 username=username2
 password=password2
 adinterval=120
 adsite=http://www.blah.org
}

Don't forget the {brackets}. They're important!
This would advertize http://www.blah.org every 120 minutes.
The webpages would get uploaded to www.myotherftp.com/mydir/,
the update interval would be 60 minutes. Note that the FTP
port is 21 too, so it doesn't need to be repeated.

REMEMBER: Do this only for channels that need _different_
          settings as given in the global configuration.