Version 0.43
OpenNap is an Open Source effort to create a version of the proprietary Napster server.
The most current version of this document can be obtained here.
Enables support for storing the email addresses of users obtained from the nickname registration command. By default this information is not kept and the server will always return unknown if this information is requested.
Enables the server-side support for resuming downloads. This option makes the server use more memory because it has to store to MD5 hash values for all shared files in addition to the other information. Note that the most popular client currently does not support resuming (Napster 2.0 BETA 7).
Compiles a routing-only version of the OpenNap server. This disables the file sharing commands for local clients, only allows users of level Admin or greater to log in, and simply routes all other messages to linked servers. This is ideal for use as a hub server to connect a cluster of other servers together.
Compile support for running OpenNap in a chroot() jail. This prevents the server from being able to read/write any files outside of its data directory. Useful for parnoid people. OpenNap must be run setuid root (at which point it will drop privs) in order for this to work.
Causes the server to keep a running count of each version of connecting clients. Useless, but fun information for client developers to see how much their particular clients are getting used on the server.
Under BSD systems, this sets the hard maximum number of connections the server can support via the select() system call. Note: under Linux FD_SETSIZE can not be redefined and is always 1024.
Turns on debugging information to catch memory leaks and buffer overruns. This is usually not suitable for "production" environments because of the extra memory use, but good for small test servers. The more testing the more likely bugs can be squashed.
Adds the -pg option to gcc to generate profiling information suitable for digestion by gprof. Profiling gives a detailed output of what the server is spending its time doing so that bottlenecks can be detected and server performance can be increased.
Each line in this file should be of the form:
<target> <nick> <when> "<reason>" [timeout]where target is what is banned, nick is the user that issued the ban, when is the time at which the ban was set (in seconds since Jan 1, 1970 0:00 UTC), and reason is the reason for the ban.
Optionally, timeout may be specified which gives the time at which the ban expires and should be removed.
Lines that begin with a hash (#) are considered to be a comment, and are ignored.
See the sample.block file as a basis to start your own configuration.
var value
Each of the values is a string, integer, or list, depending on the variable.
allow_share
Type: boolean
Default: yes
Controls whether or not clients are allowed to share files via the server.
auto_link
Type: boolean
Default: off
When set to on, opennap will automatically attempt to link to all servers listed in the servers file when it starts up for the first time.
auto_register
Type: boolean
Default: off
When set to on, the server will automatically register a nickname the first time it is used. When off, nicknames will only be registered when the client explicitly requests it. Also see registered_only, register_interval.
client_queue_length
Type: integer
Default: 102400
Sets the maximum number of bytes that can be queued for a client connection. If this threshold is reached, it is assumed that the client is either dead, or the network link can not sustain the level of output, and the server automatically closes down the client connection. This is necessary so that dead clients don't consume all of the servers memory.
compression_level
Type: integer
Default: 1
The zlib compression level to use when compressing server to server connections. 0 means no compression, 1 is least effort, 9 is best compression. The higher the number, the more cpu it will consume. Level 1 compresses text by about 50%, which is good enough for most applications.
eject_after
Type: integer
Default: 120
Specifies the number of seconds after initial login to the server for which the client is exempt from being killed for not sharing enough when the server is full (see eject_limit). This should be large enough to allow a client to start sharing files before getting killed.
eject_limit
Type: integer
Default: 0
When eject_when_full is set, only consider clients sharing less that this number of files. By default, only clients not sharing any files will ejected, but you can use this option to also eject clients which are sharing only a few files.
eject_when_full
Type: boolean
Default: off
If set to on, the server will disconnect the longest connected client which is not sharing any files when the server is full (eg., when it has reached max_connections clients). This allows room to be made for those clients which are sharing files. Also see eject_limit.
Note: mods+ are exempt and can always log in
even if they are sharing no files.
file_count_threshold
Type: integer
Default: 5000
When a indexed file search token (one word) contains more than this number of matching files, the server will warn in its log output. This gives the ability to add this term to the list of filtered words.
flood_commands
Type: integer
Default: 0
This variable, along with flood_time, allow for server-side flood protection. When set to a value greater than zero, the server will not allow clients to issue more than this number of commands in flood_time seconds. Any client attempting to send commands faster than the allowed limit is throttled back.
flood_time
Type: integer
Default: 100
See flood_commands.
ghost_kill
Type: boolean
Default: on
When enabled, opennap will automatically kill an existing connection if the same user logs in from the same IP address.
Type: boolean
Default: true
Controls whether or not the filename extensions of shared files are included in the searchable index.
Also see index_path_depth.
index_path_depth
Type: integer
Default: 2
Controls how many levels of directory are included when adding shared files to the searchable index. Often times the leading parts of the path are completely useless for searching (eg., C:\Program Files\My Music\Rock\) and just consumes a lot of memory. This variable counts from the end of the path backwards, so the higher the value, the more of the beginning of the path it will include.
Also see index_ignore_suffix.
irc_channels
Type: boolean
Default: on
When set, opennap requires all channel names to begin with # or &.
listen_addr
Type: string
Default: 0.0.0.0
By default, the server will listen on all interfaces on the system. You can force it to listen only on a single interface by specifying the ip address of the interface in this option.
log_mode
Type: boolean
Default: off
When set to on, opennap will log changes in user levels to a file.
login_interval
Type: integer
Default: 0
Specifies how often (in seconds) clients from the same IP address are allowed to connect to the server. This allows you to ignore clients which are reconnecting too fast. A value of 0 disables the check. Also see register_interval.
login_timeout
Type: integer
Default: 60
If a client has not completed the login process after this number of seconds, it will be disconnected. This is to prevent malicious parties from trying to open up many sockets to the server.
max_browse_result
Type: integer
Default: 500
Because of the limit imposed by client_queue_length, the number of files returned by a browse command is limited to this number. If this is too large, clients will be disconnected when they browse a user with many files.
max_channel_length
Type: integer
Default: 32
Specifies the max number of characters allowed in a channel name.
max_client_string
Type: integer
Default: 32
Specifies the max number of characters allowed in the client version string.
max_clones
Type: integer
Default: 0
When set to a value greater than 0, the server will only allow this many connections from the same ip address. Also see login_interval.
max_command_length
Type: integer
Default: 2048
When set to a value greater than 0, the server will disconnect any client that sends a command longer than this value. Clients that trigger this are either attempting to flood the server or are out of sync.
max_connections
Type: integer
Default: 0
When set to a value greater than 0, the server will only allow this many clients to log into the server.
max_hotlist
Type: integer
Default: 32
When set to a value greater than 0, the server will only allow each user to have this many entries on their hotlist.
max_ignore
Type: integer
Default: 32
When set to a value greater than 0, this server will only allow each user to have this many entries on their ignore list.
max_nick_length
Type: integer
Default: 19
If set to a value greater than 0, this specifies the max number of characters allowed in a nickname.
max_reason
Type: integer
Default: 64
If set to a value greater than 0, this specifies the max number of characters allowed in the "reason" strings for such commands as ban, kick and kill.
max_results
Type: integer
Default: 100
If set to a value greater than 0, this specifies the max number of search results that are returned to a client.
max_searches
Type: integer
Default: 3
Specifies the maximum number of pending searches a user is allowed to have. Once this threshold is reached, no more searches can be issued until one of the others has completed.
max_shared
Type: integer
Default: 5000
If set to a value greater than 0, this specifies the max number of files that any client may share.
max_time_delta
Type: integer
Default: 90
Specifies the maximum number of seconds of difference in clock time between two servers in order for them to be able to link. Note that if this value is set too large, users can gain ops in channels even if they were not the first user to join the channel.
A value of 0 will turn off this check completely.
max_topic
Type: integer
Default: 64
If set to a value greater than 0, this specifies the max number of characters allowed in a channel topic.
max_user_channels
Type: integer
Default: 5
If set to a value greater than 0, this specifies the max number of channels a user is allowed to join.
nick_expire
Type: integer
Default: 2678400 (31 days)
Specifies the time in seconds of after which unused accounts are expired and returned to the pool of available nicknames.
ping_interval Type: integer Default: 600
Specifies the interval (in seconds) of how often to sping peer (linked) servers.
register_interval
Type: integer
Default: 0
Specifices how often (in seconds) clients from the same IP address are allowed to register new nicknames. This can be used in conjunction with auto_register to block web/clone clients which attempt to log in with random nicknames.
registered_only
Type: boolean
Default: off
When set to on, the server only allows logins from registered clients. Also see auto_register, register_interval.
remote_browse
Type: boolean
Default: on
This variable controls whether or not the server supports remote browsing (where the client being browsed is not on the same server). In large networks, remote browsing can account for significant cross server traffic, increasing lag. Napster BETA 8 adds support for clients to directly browse eachother outside of the servers, which is the recommended approach.
report_ip
Type: string
Default: value of server_name
Sets the IP address this server listens on to be reported to Napigator
report_name
Type: string
Default: value of server_name
Sets the name of the server reported to Napigator
report_port
Type: string
Default: value of server_ports
Sets the TCP port this server listens on to be reported to Napigator
restrict_registration
Type: boolean
Default: off
If set, disallow the automatic registration of new nicknames by clients as they log in for the first time. The only way to create new nicknames (accounts) is then to use the administrator commands to register, or by editing the users file directly (when the server is not running). This option is typically used with the registered_only option to run a private, access-controlled server where users need accounts before they can log in.
search_timeout
Type: integer
Default: 180
When servers are linked, searches will be timed out if no response has been received after this many seconds. This forces the server to send the final ack to the client.
server_alias
Type: string
Default: none
Allows you to specify an alternate name by which the server refers to itself. This is useful for connecting a "hidden" hub (routing-only) server, or if you just want to use a shortcut for the full dns name.
server_name
Type: string
Default: depends on hostname
Specifies the server's DNS name.
server_ports
Default: 8888
Type: list
This option specifies a list of TCP ports which the server should listen on for client connections. Each port number should be separated by whitespace.
server_queue_length
Type: integer
Default: 1024000
Specifies the maximum number of bytes that can be queued for a server connection before it is considered dead.
stat_click
Type: integer
Default: 60
Specifies how often (in seconds) the server should send updates about server statistics (users/files/gigs) to the clients.
stats_port
Type: integer
Default: 8889
Specifies the TCP port on which the server should listen to reports stats. Typically used by Napigator. If this port is set to -1, the server will not listen for stats reporting at all.
stat_server
Type: string
Default: stats.napigator.com
Sets the DNS/IP address of the Napigator server to report stats.
Also see report_name, report_ip, report_port, stat_server_port, stat_server_user, stat_server_pass.
stat_server_pass
Type: string
Default: none
Sets the password for your napigator account to list live server stats.
stat_server_user
Type: string
Default: none
Sets the username for your napigator account to list live server stats.
strict_channels
Type: boolean
Default: off
When set to on, the server will only allow privileged users to create new channels.
user_db_interval
Type: integer
Default: 1800
Specifies the interval in seconds of how often the server should write out its database files to disk. This is important in case the server crashes prematurely, so that data loss is minimal.
usermode
Type: string
Default: ALL
Sets the default usermode for mods+ users.
warn_time_delta
Type: integer
Default: 30
If the clock on a remote server is more than this many seconds out of sync, opennap will print a warning message. Also see max_time_delta.
A value of 0 turns off the warning completely.
who_was_time
Type: integer
Default: 300
Specifies the number of seconds after a user logs out that information on the client's ip address and server is kept in cache, so that mods+ may perform a whowas command. Note: this only controls how often the cache is purged, so some nicks may appear to be older than this amount.
Sets the maximum number of file descriptors available to the server process. Generally this is used to increase the default number availble. Note that in order to increase the default maximum, the server needs to be run as root (OpenNap will drop privileges and run as the uid/gid specified by the configure arguments).
lock_memory
Type: boolean
Default: off
On supported systems, this will cause the server to lock all of its memory pages into real memory, thus avoiding swapping to disk.
max_data_size
Type: integer
Default: varies depending on OS
Sets the maximum amount of memory the process may consume. Also see max_rss_size.
max_rss_size
Type: integer
Default: varies depending on OS
Sets the maxiumum amount of real memory a process is allowed to consume. Any excess will be swapped to disk. Also see max_data_size.
<channel> <limit> <level> "<topic>"where channel is the channel name, limit is the maximum number of users allowed in the channel (0 for no limit), level is the minimum user level required to enter the channel and topic is the default topic for the channel.
NOTE: typically you edit this file once before starting your server. You should never edit it while the server is running or your changes will be lost. The server always writes out its state when it shuts down, because new information about the channel may have been set. If you want to edit it by hand, you should first shut down your server.
In certain cases, a file may contain no valid words and thus won't be able to be found via the search mechanism. However, the file will show up when browsing the client's filelist, and therefore can still be downloaded.
<server_name> <remote_pass> <local_pass> <port> [alias]where server_name is the DNS name of the remote server (the remote server should have its server_name set to this value), remote_pass is the password expected from the remote server to authenticate (prove its identity), and local_pass is the password your server uses to authenticate to the remote server.
port is the TCP port on the server to connect to.
alias is an optional string which will be used to refer to this server instead of its DNS name. This is useful for defining hub servers where you might not want the DNS name to be revealed to users, or you want to use a different name instead of the ip address (if you don't have a reverse DNS record).
Note: lines that begin with a pound sign (#) or any space character (tab, etc.) are ignored.
server_name set you to level Elite (4).where server_name is the name of your server. This message will let you know that you have fill privilege to access administrative commands on this server.
Clients such as TekNap already have all of the OpenNap extensions built into it. Others, such as the official Napster client do not (it was not inteded to be used by administrators). If you client is missing functions to directly access these administration commands, not to worry, OpenNap has a way of getting around this. OpenNap provides to pseudo-users, ChanServ for channel related commands, and OperServ for server related commands. For both of these, you can access their functionality by sending a privmsg (instant) message to either of these users (in most clients this will be either /msg user or /tell user).
Places a ban on channel such that nick is prevented from joining. You can optionally give a reason for the ban that will be displayed to the user (Note: if you specify the reason, it MUST be quoted with double-quotes (") or else the server will only show the first word of the reason).
Removes all bans from the channel.
Displays the list of bans for the channel. Note: this does not work for the official Windows Napster client since it doesn't have support for displaying it.
Kicks all users in the channel out of the channel, only leaving yourself.
Removes user nick as a channel operator and makes him/her a normal channel user.
Displays a summary of all available commands.
Send an invitation to user nick allowing them to join a channel which is set +INVITE.
Kick user nick out of the channel. A reason can optionally be given. Note: if reason is given, it MUST be quoted with double-quotes (") or else the server will only display the first word.
Displays/sets the minimum required user level to be allowed to join a channel.
Displays/sets the maximum number of users allowed to join a channel.
Displays/sets the channel mode. If no modes are given, it returns what the current channel mode is. Acceptable modes are:
Prevent user nick from being able to send messages to the channel.
If no nicknames are given, it returns a list of the current channel operators. If given one or more nicknames, each user will be given channel operator status (and thus the ability to execute any of the other channel admin commands).
Display/set the channel topic.
Remove channel ban against nick, allowing him/her to join the channel again.
Allow a previously muzzled user to send messages to the channel.
Remove the ability to speak in a +MODERATED channel.
Give the ability for a user to speak in a +MODERATED channel
Send a message to all channel operators on the channel (that is not seen by other users in the channel).
This command allows you to kill a ghost which is holding your nickame so that you can log in again. user is the nick which is ghosting, and password is the password for that account.
Allows a user to register a nickname that has not been previously registered, such that no other user may use the nickname without the corresponding password.
See usermode.
Toggles invisibility to normal users. When cloaked, normal users do not see your real nickname when you perform actions such as kill, ban, etc. Instead, it will display Operator. Other mods+ users still see the real nickname.
Display/set a server configuration variable. When value is missing, OpenNap displays the value of var. If value is specified, it sets the configuration variable.
Links the server running on server. If remote_server is specified, it tries to make a connection from remote_server to server instead of from the local server.
De-links a server from the cluster.
Causes the specified server to shut down (terminates the OpenNap process).
Display a list of all linked servers.
Resets the configuration variable var to its default value.
Causes the server to reload its configuration files.
Displays which server a particular user is logged in through.
Displays stats about the server (uptime, bytes send/recv'd, etc).
Toggles the various server messages. Each message the server sends to mods+ is given a type so that if you don't want to see a particular type of message, you can simply turn it off and still see the other messages.
Displays information about a user that has recently logged out. Information is kept cached for who_was_time seconds.
Channel operator status is given either when a user is the first user to join a chat channel, or another channel operator makes a user a channel operator using the op command. All channel operators are equivalent, meaning that if you op a user, they can immediately deop you (remove your channel operator privilege).
Note that being a channel operator is not a user level. Most channel operators are only normal users.
Message Of The Day. This is the text the server sends to your client when you first log in.