### $Id: sample.config,v 1.1 2002/08/14 21:38:07 leodav Exp $
###
### Sample configuration file for opennap
###
### This file is typically renamed to /usr/local/share/opennap/config, or
### for Win32 platforms it is C:\opennap\config
###

# this file should be read-only by the process running the daemon.  if the
# user/pass combo are leaked then anyone can alter the table used for storing
# the information

# the official name for this server (defaults to the value of gethostname(3))
#server_name localhost

# the name to use to refer to this server.  causes the `server_name' to be
# hidden.
#server_alias opennap

# port(s) to listen on for client connections (defaults to 8888)
#server_ports 4444 7777 8888

# maximum number of channels a user is allowed to join (default: 5)
#max_user_channels 5

# maximum number of chars in a nickname
#max_nick_length 32

# maximum length of server->server queue (default: 1MB)
#server_queue_length 1000000

# maximum length of server->client queue (default: 100KB)
#client_queue_length 10000

# maxiumum number of files returned by a browse command (default: 500)
# mod+ are exempt from this limit, instead they are limited by max_shared
# which is generally higher than max_browse_result
#max_browse_result 500

# maximum number of results returned for a search (default: 100)
#max_results 500

# maximum number of files a user is allowed to share (default: 5000)
# also affects results from browses for mod+ users since they are
# exempt from the normal max_browse_results
#max_shared 5000

# how often to send server stats to clients (default: 60 seconds)
#stat_click 15

# how many levels to traverse when indexing filenames (default: 2 - includes
# parent directory of file)
#index_path_depth 1

# ignore file suffixes (all data after last '.') (default: yes)
#index_ignore_suffix no

# maximum number of local connections (default: 1000)
#max_connections 100

# Maximum number of new users which are able to login per minute
# right after a serverstart. This is to avoid splits and timeouts
# due to the fact that 2000 users who want to connect to the
# freshly advertised server simultaneously produce a pretty nice
# bandwidth peak. Default value is 0. If set to 0 then no checking
# on the user/time ratio takes place.
# max_new_users_per_minute 90

# ip address to listen on (default: ANY)
#listen_addr 127.0.0.1

# max amount of idle time allowed before closing connection when logging in
#login_timeout 60

# max length of a client command (default: 2kbytes)
#max_command_length 2048

# automatically register all user accounts the first time they log in
# (default: off)
# auto_register 0

# require all accounts to be registered (default: off)
# registered_only 0

# maximum number of entries allowed for a hotlist (default: 32)
# max_hotlist 100

# maximum number of entries allowed on an ignore list (default: 32)
# max_ignore 100

# maximum length of a channel topic (default: 64)
# max_topic 100

# maximum length of the client version string (default: 32)
# max_client_string 100

# maximum length of the reason string in the kick/kill/muzzle commands
# (default: 96)
# max_reason 96

# compression level (0 = none, 1 = least effort (default), 9 = best effort)
#compression_level 6

# maximum number of connnections from a single ip (default: 0 [unlimited])
#max_clones 3

# port to listen on for stats reporting (useful to napigator)
#stats_port 8889

# String list of IPs for the local server to protect its Elite (default *)
#protnet 192.168.0.*,128.1.128.1

# String list of clients not allowed on your server (default null)
#invalid_clients *floodster*,*mp3rage*,*rapigator*

# String list of nicks not allowed on your server (default null)
#invalid_nicks joey2cool,*trade*

# String list of nicks allowed access to 9998 and 9999 (default null)
#set_server_nicks Khaytsus,ShadoeMynx

# when max_connections has been reach, opennap will kick users who aren't
# sharing files in order to make room for other clients if `eject_when_full'
# is set to 1 (default: 0)
#eject_when_full 1

# Even with eject_when_full off, do we eject leeches to make
# room for real users?  Default off, if set on, leeches are
# ejected for another user.
# eject_leeches 1

# set the min number of files a client has to share in order to be exempt
# from `eject_when_full'.  Any client that shares either eject_limit_files+1 files 
# or 'eject_limit_libsize+1 Megabytes will not be disconnected.
#eject_limit_files 0

# set the min amount of Megabytes a user has to share in order to be exempt
# from 'eject_when_full'. Any client that shares either eject_limit_files+1 files 
# or 'eject_limit_libsize+1 Megabytes will not be disconnected.
#eject_limit_libsize 1572864

# Should a eject of a client also result in a timed ban of the nick?
# The default value is 0 so no bans will occur
# eject_also_bans 0

# If eject also bans - how long should the ttl of the nonsharing client be?
# The default value is 1800 seconds.
# eject_ban_ttl 1800

# If the eject_limits are on then a freshly started server may 
# ban users because the load on such a server is so high that
# some users are not able to get their files shared in time or
# even may time out when sharing.
# The variable "eject_grace_time" is the time in seconds 
# after which the eject_limits are checked right after the serverstart-
# The default value is ten minutes ( 600 seconds ).
# eject_grace_time 600

# Only eject users in they are NOT in a channel.
# eject_nochannels 1

# Ban time in seconds of excessive clients.
# ibl_ttl 300

# Set the lower limit of filesize which a single file must at least have to be shared.
# If the min_file_size is 0 then there is no checking on this parameter.
# Default value is 0
# min_file_size 0

# set the maximum number of certain tags per minute a client could issue to the server.
# Some analysis showed that the tags 218, 219 and 700 were abusively used by 
# some buggy clients. When the client has more than max_tags_per_minute tags then
# the request is simply ignored. If you set this to 0 then no checking of
# Tag abuse will occur. The default value is 2 and this value helped reducing
# the traffic on a hub by up to 50%.
# max_tags_per_minute 2

# Set the maximum number of searches (tag 200) a client is allowed to make during
# his connection. Default value is 2. A value of 0 does not check the number of searches at all.
# This limit is calculated by using: ( count200 - evaluate_search_abuse_after_tags ) / onlinetime
# So a value of 2 searches should be sufficient.
# max_searches_per_minute 2

# To give the hub in a distributed network some relief and to speed up repeated 
# searches an internal cache is maintained. How many searches should be cached?
# The default value is 500 searches. 
# You can query the cache stats using /raw 10116
# The format of the output is:
# Counter Rank Usage Starttime LastUsedTime SearchString
# search_max_cache_entries 500

# After how many seconds should "max_searches_per_minute" be evaluated? This is to
# prevent that a freshly connected user will be prosecuted because he is initally
# searching all of his incompletes.
# evaluate_search_abuse_after_secs 120

# After how many tags in total should max_searches_per_minute be evaluated? This is to
# prevent that a freshly connected user will be prosecuted because he is initally
# searching all of his incompletes. The default value is 100. After 100 requests 
# the counter starts counting.
# evaluate_search_abuse_after_tags 100

# Some buggy clients send a lot of privmsgs containing //WantQueue. If 
# this value is set to 1 then these privmsgs will be blocked on the
# server this user is connected to. The default value is 0.
# To get a picture what a waste of bandwidth occures when not switching
# this to 1 grep your opennap logfile for "privmsg". 
# It should display something like:
# privmsg: all 205: 43000 705596 Bytes - 205WQ: 39096 (90.9%) 431382 Bytes (61.1%)
# privmsg: all 205: 44000 720813 Bytes - 205WQ: 40030 (91.0%) 441662 Bytes (61.3%)
# after only some hours of uptime. 205WQ is the count and the size of privmsgs 
# containing a queueing message.
# break_mx_queue 0

# Minimum level to make users Friend status, where they can login
# any time regardless of max_connections or bans.  Default 2, moderator.
# level_to_set_flags 3

# If you want to allow that a user with the same username and 
# the same password and the same IP address is able to kill 
# himself via the "ghost" command then enable this one.
# See "allow_dynamic_ghosting" for more details.
# ghost_kill 1

# If a client was disconnected by his ISP and tries to relogin
# using his new IP address he will receive the message
# "<nickname> is already active" for a certain ammount of time.
# This is because ghosting is allowed for the same ip address 
# in the first place and this is the default value of this var.
# If you want to allow that ghosting is allowed
# regardless of the ip address then set this value to 1
# allow_dynamic_ghosts 0

# When set to 0 the abuse of the tags mentioned above is not reported 
# to the mod+ users on your system. Default value is 1.
# notify_mod_abuse 1

# When "notify_mod_abuse" is set to 1 then this following var 
# reports the frequency of notifications which are sent.
# A notify-mod_abuse_frequency of 100 means that every 100th
# abuse per user is reported via notify_mods().
# Default value is 100
# notify_mod_abuse_frequency 100

# When set to 1 the abuse of the tags mentioned above is reported to
# the user issueing the tag via a privmsg. Default value is 0.
# notify_user_abuse 1

# When "notify_user_abuse" is set to 1 then this following var 
# reports the frequency of notifications which are sent.
# A notify_user_abuse_frequency of 1000 means that every 1000th
# abuse per user is reported via privmsg to the user.
# Default value is 1000
# notify_user_abuse_frequency 1000


# When a user ignores a mod+ this is annoying enough.
# But when the mod killbans the user just to have the 
# user relogging in with another nick this hits the spot 
# multiplied by -1.
# The vars "discipline_ignorers" and "discipline_ignorers_ban_ttl"
# take some care of these cases. 
# If you declare "discipline_ignorers 1" then the ignoring
# user will be kicked. If you additionally specify
# "discipline_ignorers_ban_ttl" >0 then these users will be banned
# in addition to that for the ammount of seconds specified.
# If you set the latter value to 0 then no banning will occur.
# Both default values seem reasonable enough. ( 1 and 2592000 )
discipline_ignorers 1
discipline_ignorers_ban_ttl 2592000


# When a user shares a file which name matches one of the patterns
# in the "block" file then you are able to kick them as soon they
# finish sharing their files. This is mostly used to protect your
# network from users who share incriminating stuff but it can 
# hit inocent users too. So craft your block file with care!
# The default value is 0 which means not kickbanning any users
# sharing files in the block file. But the files won't show up
# in any search and they won't show up when browsed via the 
# server ( see max_browse_results too ) but they will 
# show up if the clients browse each other directly.
# discipline_block 0

# You can distinguish the innocent user from the mean ones 
# by broadcasting the files shared by users flagged as criminal
# via notify_mod(). Any MOD+ on your server then will see all 
# files shared by a suspect after and including the first 
# file which matches any pattern in the block file.
# The default value is not to notify mod+ of the incidental files.
# Please note that the opennap.log ( if you use one ) still will
# contain the information when you set this to 0.
# notify_mod_block 0

# If discipline_block is set to 1 then you must specifiy a 
# ban ttl for criminals. The default value is 30 days.
# discipline_block_ban_ttl 25922000

# By default MOD+ are not exempt from the blockban. By setting
# this variable to 0 they are. Keep in mind that this even affects
# elite! You can get a list of the naughty mods in your network
# by querying the CRIMINAL flag.
# discipline_block_mod 1

# When set to 1 mod+ are exempt from the notification of tag abuse.
# This only affects mod+ who are on a server where "notify_user_abuse" 
# is set to 1.
# Default value 0
# no_mod_annoying 0

# specifices the number of seconds a client is exempt from ejection when
# they first log in.  this should be large enough to give a client time
# to start sharing files.
#eject_after 120

# number of commands that can be issued in `flood_time' seconds
#flood_commands 5

# number of seconds in which `flood_commands' number of commands can be
# issued by a client
# (default: 0 [no flood control])
#flood_time 10

# set the threshold after which opennap will warn if the number of files
# matching a particular search term exceeds this value.  (default: 5000)
#file_count_threshold 1000

# set the time after which unused nicknames are expired.  if a user hasn't
# logged in for this number of seconds, the nick is considered expired.
# mod+ accounts are exempt, and never expire (for security reasons)
# default: 31 days
# note: the value should be in seconds
#nick_expire 2678400

# Napigator support - you should only need to set stat_server_user and
#   stat_server_pass at the minimum.  If you have used your correct DNS
#   name for server_name above, then you don't need to use any of the
#   report_* variables.  If opennap has trouble detecting the proper values
#   to send to napigator, then you should set the report_* variables
#   appropriately.
#stat_server_user myuser
#stat_server_pass mypass
#stat_server_host stat.napigator.com
#stat_server_port 8890
# my server name on www.napigator.com
#report_name my.server.name
# this is the ip address that is externally visable
#report_ip 1.2.3.4
# this is the TCP port where clients can connect
#report_port 8888

# END of Win32 configuration.  What follows is only for the Unix versions

# if your operating system has a small limit for the maxium amount of data
# a single process is allowed to allocate, adjust this value to the maximum
# you wish to use.  on many systems this does not even require root access
# to change to a higher value (default: -1, use system default)
#max_data_size 64000000

# this value adjusts how much real memory each process is allowed to consume
# before parts of the allocated memory get swapped out (default: -1, use
# system default)
#max_rss_size 64000000

# set this to the highest value that max_connections will ever be during the
# process lifetime.  this can't be changed while opennap is running because
# on many systems it requires root privilege, and we drop those before
# handling user input as a security measure.  (default: 1024)
#connection_hard_limit 4096

# prevent opennap from being swapped to disk.  WARNING!  this should only
# be used in conjunction with the max_data_size otherwise opennap could
# consume all of your system memory (default: off)
#lock_memory 0

# Set the detail level of logging for your server.
#
# The log levels are as follows:
# 0 No logging at all
# 1 Just log server related stuff
# 2 Log server related and client related messages
# 3 All of the above and login messages
# 4 Log file messages ( e.g. blocked file names )
# 5 log share messages
# 6 Log search messages
# 7 Debugging level ( be prepared of *ALL* things including running out of diskspace ;-)
#
# I personally would recommend a loglevel of 4 in conjunction with "discipline_block" so
# that you can prove someone innocent of sharing blocked files by the logging of files.
#
# The default however is 3
# log_level 3

# EOF
