# This is an example configuration file for mooproxy.
# It contains all configurable options, all set to the same defaults that are
# hardcoded into mooproxy.
#
# You need to change at least listenport and auth_hash before you can
# use mooproxy.



# The network port mooproxy listens on for client connections.
listenport = -1
# Clients connecting to mooproxy have to provide a string
# (such as "connect <player> <password>") to authenticate
# themselves. This setting contains a hash of this string.
# 
# To change auth_hash, you need to specify the new hash as
# well as the old literal authentication string, like so:
# 
# /auth_hash <new hash> "<old literal string>"
# 
# You can generate a new hash by running mooproxy --md5crypt.
# See the README for more details on authentication.
auth_hash = ""



# The hostname of the server to connect to.
host = ""

# The port to connect to on the server.
port = -1

# If true, mooproxy will try to log you in after connecting to
# the server. For this, it will use the client authentication
# string (see auth_hash).
autologin = false

# If true, mooproxy will attempt to reconnect to the server
# whenever the connection to the server is lost or fails to be
# established. It uses exponential back-off.
#
# Mooproxy will not reconnect if establishing a connection
# fails directly after the /connect command has been issued.
#
# Autoreconnect usually only makes sense if autologin is on.
autoreconnect = false



# Lines from the client starting with this string are
# interpreted as commands (but see also: strict_commands).
# This string does not need to be one character, it can be any
# length (even empty).
commandstring = "/"

# If mooproxy receives a string from the client that starts
# with the commandstring, but is not a valid command, this
# setting determines what mooproxy will do.
#
# If true, mooproxy will complain that the command is invalid.
# If false, mooproxy will pass the line through to the server
# as if it was a regular line.
strict_commands = true



# Informational messages from mooproxy to the user are
# prefixed by this string.
#
# Use the following sequences to get colours:
#   %b -> blue   %g -> green  %m -> magenta  %w -> white
#   %c -> cyan   %k -> black  %r -> red      %y -> yellow
# Use uppercase to get the bold/bright variant of that colour.
# Use %% to get a literal %.
infostring = "%c%% "

# Mooproxy prefixes this string to the "context history",
# "possibly new lines", "certainly new lines" and "end of new
# lines" messages. Setting this to something colourful might
# make it easier to spot these messages.
#
# This string accepts the same colour sequences as infostring.
# If this string is set to the empty string (""), mooproxy will
# use the regular infostring for these messages.
newinfostring = "%C%% "



# When a client connects, mooproxy can reproduce lines from
# history to the client, in order to provide the user with
# context. This setting sets the number of reproduced lines.
context_lines = 100



# The maximum amount of memory in KiB used to hold history
# lines (lines you have already read) and new lines (lines you
# have not yet read).
#
# If the amount of lines mooproxy receives from the server
# while the client is not connected exceeds this amount of
# memory, mooproxy will have to drop unread lines (but it will
# still attempt to log those lines, see logbuffer_size).
buffer_size = 4096

# The maximum amount of memory in KiB used to hold loggable
# lines that have not yet been written to disk.
#
# If your disk space runs out, and the amount of unlogged
# lines exceeds this amount of memory, new lines will NOT be
# logged.
logbuffer_size = 4096



# If true, mooproxy will log all lines from the server (and a
# select few messages from mooproxy) to file.
logging = true

# If true, all logged lines are prefixed with a [HH:MM:SS]
# timestamp.
log_timestamps = true
