######
#####
###   General Settings
#####
######

# the file where the data is stored
# WARNING: Always set this var _before_ the module is loaded, or it won't
# find your stats.
set statsfile "statsmod.dat"

# load the module itself
loadmodule stats

# save data every x minutes
set save-stats 15

# add new users to the database if they stay more than x minutes 
# in the channel
# >0: enabled
#  0: don't add new users, but recheck every minute if a user idented himself
# -1: don't add new users and don't recheck every minute. If someone idents
#     him/herself, he/she must cycle the chan to be recognized. (lowest CPU usage)
set autoadd 5

# delete users that have been added by the module if they haven't been seen
# for more than x days
set expire-users 30

# log wordstats (most used words) (this stats are resetted daily)
# NOTE: This is very cpu- and memory consuming, so don't
# turn this on if you're worried about memory or cpu usage
set log-wordstats 0

# minimum length of a word to be logged
# (0 is best to get exact results)
set min-word-length 0

# display how many random URLs in the misc stats?
# (setting this to 0 also disables the logging of URLs
# and can therefore lower your cpu-usage)
set display-urls 5

# display how many random kicks in the misc stats?
set display-kicks 5

# when logging kicks, also save the last x lines of activity in the chan
set kick-context 5

# log every Xth quote
# If this value is lower, then the random quotes will be more random,
# but the memory usage will also increase.
set quote-frequency 5

######
#####
###   languages
#####
######

# reset old slangs before we load the new ones...
resetslang

# load the default language
loadslang language/stats.lang

##  load additional languages
# loadslang ger language/stats.ger.lang
#
## assign a language to a channel
# setchanslang #xwp ger

######
#####
###   public commands
#####
######

# the char that marks public commands (!top10, etc...)
# "" is a valid option
set cmdchar "!"

# don't answer more than x commands in y seconds
set max-stat-cmds 5:60

# information that the !stat reply will contain
set stat-reply "words letters smileys minutes"

######
#####
###   HTML settings
#####
######

# list the top x users
set topnr 30

# NOTE:
# table-color and fade-table-color are hex numbers which represent a rgb color.
# If you do not know how to use this format, either use the default or ask
# someone who knows it. (it's the HTML-standard-format)

# the background color of your table
set table-color 0x3850B8

# fade table color to another color
set fade-table-to 0x000000

# border width of the table (0 == no border, which is probably the best)
set table-border 0

# The following two settings only affect the display of the stats. The bot will
# still log and save everything, no matter if it's displayed or not.
#
# Please don't use "slangified" types! For example, use always "idle" instead of
# "idle-factor" or whatever you defined in the langfiles.

# which stats should be shown?
set topstats "words lines wpl actions smileys kicks modes topics idle minutes"

# and which stats should be mentioned in the graphical output?
set graphstats "words lines actions smileys kicks modes topics minutes"

# mention the top x users in the graphical stats.
set graphnr 15

# which colour should the bars have?
set graphcolor "blue"

# display the average number of users in the chan?
set display-average-users 1

# display the users which are currently on channel in /chan/onchan/ ?
set show-usersonchan 1

# display a list of all users in /chan/users/ ?
set show-userlist 1

# display channels, which are +secret on the livestats index?
set list-secret-chans 1

# You can use a backgound to fill the bars to get a nice 3d look, for example.
# WARNING: entering a non-existant filename might mess the output up in some
# browsers
# WARNING2: use a full URL if you're using livestats.
# (this is now disabled by default, because 50% of the users made it wrong <g>)
#set graphgif "http://your.shell.com/~you/bar.gif"

##
## Livestat settings
##

# listen on which port for livestat connection?
# (to disable, either comment this out or use "off" or 0 as value)
# (if you use the default, you can access the stats at
#  http://your.shell.com:8033/ )
livestats 8033

# By default, livestats listens on every available vhost for incoming
# connection. If you want to limit livestats to one vhost, then enter
# its IP(_not_ the host) below
#set livestats-ip ""

# log access to livestats to a logfile? (set to "" to turn off)
set livestats-log "livestats.log"

# the log-level where you can monitor access to livestats on your console
# (use .console +1 to activate it)
set livestats-loglevel "1"

# don't serve more than x livestats pages in y seconds (to prevent flooding)
set max-livestats-access 5:10

####
## only for the frequently updated webfiles
##
## this feature is outdated, don't use it unless you really need it
###

# update webfiles every x minutes
# (set this to 0 to disable)
# (this is now disabled by default, use livestats instead!)
set webupdate 0

# directory where the files will be written to
# don't use your standard webdir here, since index.html will be
# overwritten and a lot of subdirs will be created
set webdir "../public_html/stats"

######
#####
###   other (rather unimportant) settings
#####
######

## stats.mod saves new users in an internal database by default
## for compatibility reasons, the old way of using the eggdrop
## user file is still available, but I strongly recommend to let
## it turned off!
#set use-eggdrop-userfile 0
#
## don't add new hosts to users with the following flags
## (only works for users in the eggdrop-userfile, use
##  .schattr <user> -addhosts for users in the stats-userbase)
#set anti-autoadd-flags "ofvb|ofv"
#
## exclude users with the following flags from the top10, top20...
## (also only for eggdrop-userfile. Use .schattr <user> -list.
#set anti-stats-flag "b|-"
##
## Please note that the last two settings don't affect the internal
## user database of stats.mod at all! They only work if
## use-eggdrop-userfile is set to 1
## (maybe I'll change this for the next version)

# defines what will be counted as a smiley
# (don't add hundreds of smileys if you want a reasonable cpu usage)
set smileys ":-) :) ;) ;-) ^_^ :-D :-P :P =) ;D"

###############################################################################
# end of config
# just ignore everything below ^_^
###############################################################################

catch "unbind pub - !top10 *pub:!top10"
catch "unbind pub - !ttop10 *pub:!ttop10"
catch "unbind pub - !top20 *pub:!top20"
catch "unbind pub - !ttop20 *pub:!ttop20"
catch "unbind pub - !stat *pub:!stat"
catch "unbind pub - !tstat *pub:!tstat"
catch "unbind pub - !place *pub:!place"
catch "unbind pub - !tplace *pub:!tplace"
catch "unbind pub - !wordstats *pub:!wordstats"
catch "unbind pub - !topwords *pub:!topwords"
bind pub - ${cmdchar}top10 *pub:!top10
bind pub - ${cmdchar}ttop10 *pub:!ttop10
bind pub - ${cmdchar}top20 *pub:!top20
bind pub - ${cmdchar}ttop20 *pub:!ttop20
bind pub - ${cmdchar}place *pub:!place
bind pub - ${cmdchar}tplace *pub:!tplace
bind pub - ${cmdchar}stat *pub:!stat
bind pub - ${cmdchar}tstat *pub:!tstat
bind pub - ${cmdchar}wordstats *pub:!wordstats
bind pub - ${cmdchar}topwords *pub:!topwords
