ModManager

From BF2 Technical Information Wiki
Jump to navigation Jump to search

Mod Manager

What is ModManager

ModManager is server framework that enables players, admins and developers to get the most out of BattleField 2 servers.

It enables custom admin modules to be easily developed to enhance the abilities of the server.

Additional or updated modules are then easily installed and loaded without even restarting your server, reducing down time and keeping players happy.


Getting ModManager

Download the latest version of ModManager here: http://www.fileplay.net/file/258

Installing ModManager

To install just unzip into your servers directory

Running ModManager

Their are two ways you run ModManager depending on which package you have.

  • Package #1 (Quick)

If you dont have modmanager.py in your bf2/admin directory no further action is needed.

  • Package #2 (Safe)

If you have a modmanager.py in your bf2/admin directory you will need to change your server config to to use it as the admin script e.g.

sv.adminScript "modmanager"

If you are using the Windows server launcher change AdminScript to be "modmanager" ( without the quotes )

Installing new modules

This couldnt be simpler just extract the new module so that it sits in the "admin/modules" directory, add the following to your modmanager.con and away you go:

modmanager.loadModule "<new module>"

Enhanced Rcon

ModManager includes a much enhanced rcon which can easily be extended by addition modules. Due to this flexibility different command will be available depending on which modules you have loaded. For a full list of available commands use the built in help system once you are logged into rcon.

Default Modules

Core ( modmanager )

This is a Module Manager for BattleField 2 It enables users to add and remove modules dynamicly using a centralised configuration which is multi server friendly.

The location of the config file modmanager.con is determined by locating the directory which contains the servers maplist.con.

It provides a fully expandable and configurable Module framework and Rcon implementation.

Config
# The sub path where modules are to be found
modmanager.moduleBase "modules"

# Auto save config when shutting down
modmanager.autoSave 1

# The path to look in when @HOME@ is seen in the path
# of the servers main config file
modmanager.homeGuess "C:/Documents and Settings/Administrator/My Documents/Battlefield 2/"

# The name of the core rcon module
modmanager.rconModule "mm_rcon"

# The name of the core ban manager module
modmanager.banManagerModule "mm_banmanager"

# The name of the core logger module
modmanager.logModule "mm_logger"

# Enable / disable debug logging
modmanager.debugEnable 0

# The file to send debug logging to
modmanager.debugFile "modmanager_debug.log"

# The log verbosity:
# 0 = errors
# 1 = + warnings
# 2 = + info ( default )
# 3 = + debug
# ...
modmanager.logLevel 2,

# If the log file is auto flushed after every write
modmanager.logAutoFlush 1

# The format for the log date
modmanager.logDateFormat "[%Y-%m-%d %H:%M:%S] "


Rcon methods
# Print the running config
mm printRunningConfig

# Save the running config
mm saveConfig

# Load the specified module
mm loadModule <module_name>

# List the known modules an their states
mm listModules

# Shutdown the specified module
mm shutdownModule <module_name>

# Start the specified module
mm startModule <module_name>

# Reload the specified module
mm reloadModule <module_name>

# Set the parameter of a module
mm setParam <module_name> <param> <value>
Notes
  • Its not currently garanteed that shutdown methods are called when the server exits. Due to this autoSave may be unreliable
  • Setting the parameter of a module may not take effect until that module is reloaded or the server restarted ( requires saveConfig )

Auto announcer ( mm_announcer )

This is an Auto Announcer ModManager module

Config
# Add a join message
mm_announcer.addJoinMessage "<message>"

# Add a timed message
mm_announcer.addTimedMessage "<start>:<repeat>:<message>"
Rcon commands
# List the current announcements
announcer list

# Add a timed message
announcer addTimed <start> <repeat> "<message>"

# Remove a timed message
announcer removeTimed <announceid>

# Remove all timed messages
announcer .clearTimed

# Add a join message
announcer addJoin "<message>"

# Remove a join message
announcer removeJoin <announceid>

# Remove all join messages
announcer clearJoin
Notes
  • Join messages currently go to everyone due to a python API bug
  • The '|' character in messages to represents a new line.

Auto Balance ( mm_autobalance )

This is a autobalance system ModManager module

Config
# Allow Commander if 0 then we never autobalance the commander
mm_autobalance.allowCommander 0

# Allow Squad Leader if 0 then we only autobalance squad leaders
# if they are the only member of that squad
mm_autobalance.allowSquadLeader 0

# Allow Squad Member if 0 then we only autobalance squad members
# if there are no none squad members / commander on the team
mm_autobalance.allowSquadMember 0

# Allows plays to be switched teams at the end of a round
# 0 => No swap
# 1 => Swap teams
# 2 => Randomise teams
mm_autobalance.roundSwitch

Ban Manager ( mm_banmanager )

Config
# The filename to use for bans
mm_banmanager.banFilename "mm_bans.xml"

# The message format announced to players being banned
# This must include the template %s <player> and %s <reason>
mm_banmanager.banMessage "%s you are being banned (reason:%s)

# The default ban reason
mm_banmanager.defaultBanReason "Unknown"

# The default ban period
mm_banmanager.defaultBanPeriod "Perm"

# The default ban method must be either "Key" or "Address"
mm_banmanager.defaultBanMethod "Key"

# The default ban message delay
mm_banmanager.defaultBanDelay 5

# The default unban reason
mm_banmanager.defaultUnBanReason "Unknown"

# The default ban nick
mm_banmanager.defaultBanNick "N/A"

# The default ban address
mm_banmanager.defaultBanAddress "N/A"

 # The default ban cd key hash
mm_banmanager.defaultBanCdKeyHash "N/A"

# The default kick reason
mm_banmanager.defaultKickReason "Unknown"

# The date time format used for bans parsed in and output in the xml
mm_banmanager.dateTimeFormat "%d/%m/%Y %H:%M:%S %Z"

# The backup date time format used to parse in bans from the xml file
mm_banmanager.oldDateTimeFormat "%a %b %d %H:%M:%S %Y"
Notes

Don't use admin commands directly on the servers console to manipulate bans or inconsistencies will occur. All rcon commands are safe to use. Currently 'time' based bans are not expired i.e. ban period = '20' # 20 seconds ban period = ':20' # 20 seconds since 01-01-1970 This will be fixed in a future release Round bans however are correctly expired

BF2CC ( mm_bf2cc )

See http://www.bf2cc.com for more details.

Player Kicker ( mm_kicker )

This is a Player Kicker ModManager module it kicks high ping, low ping and idle players.

Config
# The maximum ping before violation is triggered ( 0 = disabled )
mm_kicker.maxPing 0

# The minimum ping before violation is triggered ( 0 = disabled )
mm_kicker.minPing 0

# The minimum score before players are kicked ( 0 = disabled )
mm_kicker.negScoreKick -15

# The number of ping violations before a player is kicked
mm_kicker.pingLimit 8

# The maximum time a player can be idle before being kicked ( 0 = disabled )
mm_kicker.idleLimit 300

# Ignore idle players while waiting for min players to start a round
mm_kicker.idleIgnoreNotStarted 1

# The delay on map start before samples at taken
mm_kicker.initDelay 60

# The period over which samples are considered
mm_kicker.samplePeriod 120

# The delay applied to position information to prevent cheating
mm_kicker.positionDelay 120

# The time between samples
mm_kicker.sampleRate 10

# The type of kick used:
# 1: rcon
mm_kicker.kickType 1

# The delay after informing the player before they are kicked / banned
mm_kicker.kickDelay 5

# The message displayed to the player before they are kicked
mm_kicker.kickMessage "Sorry '%s' your are being kicked ( ping too %s )"

# Add a word which if said will result in a ban word violation
mm_kicker.addBanWord "newbee"
mm_kicker.addBanWord "badman"

# Add a pattern which if matched will result in a ban word violation
mm_kicker.addBanPattern ".*bee"

# The number of ban word violations before a player is banned
mm_kicker.banLimit 1

# Add a word which if said will result in a kick word violation
mm_kicker.addKickWord "killer"
mm_kicker.addKickWord "upety"

# Add a pattern which if matched will result in a kick word violation
mm_kicker.addKickPattern ".*ller"
mm_kicker.addKickPattern "Kill.*"

# The number of kick word violations before a player is kicked
mm_kicker.kickLimit 3

# The period a ban lasts for
mm_kicker.banPeriod "Round"

# The ban reason used when a player is banned
mm_kicker.banWordReason "Using bad / racist language"

# The message displayed to a player when they are kicked
mm_kicker.kickWordMessage "%s you are being kicked from this server for using bad / racist language"

# The message displayed to a player when they are warned about bad / ban words
mm_kicker.warnWordMessage "WARNING: Please refrain from using bad / racist language on this server '%s'"

# Enable chat checks, set to 0 to disable them
mm_kicker.enableChatChecks 1
 
Notes
  • All times are in seconds
  • It is recommended you use addBanWord and addKickWord instead of patterns as it is much more efficient
  • When changing messages ensure that any replacement parameters are maintained e.g. %s

Logger ( mm_logger )

This is a basic logger which writes to a file.

Config
# The file name to log to
mm_logger.logFilename "modmanager.log"

# Auto flush, writes info to disk instantly instead of buffering if 1
mm_logger.logAutoFlush 1

# Append to the log if it already exists if set to 1
mm_logger.logAppend 1

Enhanced Rcon ( mm_rcon )

Config
# The port to enable rcon on
mm_rcon.rconPort 4711

# The IP to listen on
mm_rcon.rconIp "0.0.0.0"

# The basic admin password
mm_rcon.rconBasicPassword ""

# The super admin password
mm_rcon.rconPassword ""

# The depth of the listen queue to use
mm_rcon.rconListenQueue 5

# Allow batching
mm_rcon.allowBatching 1

# Enable port lingering
mm_rcon.enableLinger 0
 
# The level a user gets when using the rconBasicPassword
mm_rcon.basicAuthLevel 50

# The level a user gets when using the rconPassword ( super password )
mm_rcon.superAuthLevel 100

# Log all rcon commands executed by admins at info level ( disabled by default )
mm_rcon.logCommands 0

# The time to linger for
mm_rcon.lingerFor 1

# Enable Address / port reuse
mm_rcon.reuseAddress 1

# The message to broadcast when a player becomes admin ( rcon login <password> )
mm_rcon.loginMessage "Player '%s' became a server administrator"

# The message to broadcast when a player give up admin ( rcon logout )
mm_rcon.logoutMessage "Player '%s' gave up administrator rights"

# Lock settings so they cant be changed from their initial values
mm_rcon.addLockedSetting "sv.coopBotCount"

# Restrict gametypes so they cant be used
mm_rcon.addRestrictedGametype "bf2.gpm_coop"

# Enable advanced map size validation via map.desc files
# This is disabled by default as custom maps often have invalid .desc files
mm_rcon.advancedMapSizeValidation 0


Rcon commands
# Authenticate with the server must be called before using any other methods
# for players the parameter is the password for rcon users this is the
# password hash generated using the given salt
login <password|password_hash>

# Logout of rcon, this removes all the users privaledges
logout

# List the rcon users
users

# Execute a console command
exec
 
# Kick a player from the server with a message
kick <playerid> "<reason>"
 
# Ban a player from the server with a message
ban <playerid> "<reason>"

# Ban a player for a specified timer period from the server with a message.
banby <playerid> <bannedby> <period> "<reason>"

# Display the current banlist
banlist

# Clear the current banlist
clearbans

# Unban a player with an optional reason.
unban <address|cdkey> "<reason>"

# List the players on the server
list

# Prints your profileid ( in game only )
profileid

# Print a list of players and their profileid's
profileids
 
# Display help, if a command is named detailed help is displayed on
# just this command
help [command]

# Change to a specific map gametype and optional size
map <map> <gametype> [<size>]
Enhancements
  • ModManager compatible
  • Optimised update()
  • Added IP and Listen queue options
  • Added dynamic handlers to enable flexible expansion for:
    • Commands
    • Authentication.
    • Authentication notification
    • Client Connect
    • Client Disconnect
  • Added interactive command help
  • Added sub command framework
  • Added an additional logout command
  • Now sets linger and reuse on the listen socket
  • Added DOS repetative connect protection
  • Added player admin login / logout broadcast
  • Single install, multi server friendly ( for GSP's )
Notes
  • Don't disable reuseAddress ( set to 0 ) as this can cause rcon to stop responding
  • Set loginMessage / logoutMessage to "" to disable them
Original Info

This is a very simple, TCP based remote console which does simple MD5 digest password authentication. It can be configured via the admin/default.cfg file. Recognized options are 'port' and 'password'.

Implementation guidelines for this file (and for your own rcon modules):

- All socket operations MUST be non-blocking. If your module blocks on a socket the game server will hang.

- Do as little work as possible in update() as it runs in the server main loop.

Other notes:

- To get end-of-message markers (0x04 hex) after each reply, begin your commands with an ascii 0x02 code. This module will then append the end-of-message marker to all results. This is useful if you need to wait for a complete response.


Reserver ( mm_reserver )

This is a slot reserver ModManager module.

It works by kicking people when the reserved slots limit is reached, hence keeping the slots open for "registered" players ( mm_reserver.addProfileId 11111 ). If all registered players are in the server then no slots are kept open.

This is by no means optimium but without the ability to password the server on the fly or to know when a "registered" player is attempting to join there are no other ways. Due to this please only use this module if absolultely required and keep the reservedSlots to a minimum.

This module is very much still BETA due to some missing functionality in the BattleField 2 servers itself.

Config
# The number of slots to reserver
mm_reserver.reservedSlots 1

# The delay after messaging the player before they are kicked
mm_reserver.kickDelay 5

# The kick mode used:
# 1: On spawn ( default: tells the player why they are being kicked )
# 2: On connect ( kicks as soon as the player attempts to connect )
mm_reserver.kickMode 2

# The kick type used:
# 1: rcon
mm_reserver.kickType 1

# The message used
mm_reserver.kickMessage "Sorry '%s' your are being kicked ( reserved slots reached )"

# The private password to be used on the server when reserved slots are required
mm_reserver.privatePassword ""

# Add profileids to the reserved list
mm_reserver.addProfileId 11111
mm_reserver.addProfileId 22222
Notes
  • On ranked servers the maximum number of slots that can be reserved is 20% of the total slots available
  • Punkbuster kick is not currently supported
  • The private password is currently only effective on none ranked servers

Squadless Kick System ( mm_squadless_kick )

Kicks a player from the server if they have not joined a squad in a specified interval.

Config
# Sets time between spawning without a squad and being kicked
mm_squadless_kick kick_time 90

# Sets interval time to remind a player before being kicked
mm_squadless_kick reminder_interval 15

Team Kill Punish ( mm_tk_punish )

This is a team kill ModManager module

Config
# Sets the time allowed for punishment
mm_tk_punish.punishTime 20

# Sets if punish / forgives should be announced
# 0 = no announcements
# 1 = announce punishes only
# 2 = announce punishes and forgives
mm_tk_punish.announcePunishments 1

# Sets the punish message ( must included the default replacement parameters )
mm_tk_punish.punishMessage "TKPUNISH: %s punishes %s for a teamkill (%s has %d punishes and %d forgives)"

# Sets the forgive message ( must included the default replacement parameters )
mm_tk_punish.forgiveMessage "TKPUNISH: %s forgives %s for a teamkill (%s has %d punishes and %d forgives)"

# Ban reason
mm_tk_punish.banReason "Team killing"

# Ban period
mm_tk_punish.banPeriod "Round"

# Ban Message delay
mm_tk_punish.banMessageDelay 5

# Banned by
mm_tk_punish.bannedBy "ModManager Team Kill Punisher"

Developing modules

Developing modules for ModManager is easy. A good starting point is contained in the modules/mm_sample directory. In addition to this the core modules that ship with ModManager will help you with examples of how almost everything works.

The ModManager API below is the listing of the methods ModManager provides to enable you to develop BF2 modules quickly and easily.

Extending rcon in modules is simple the module just needs to register its additional command handlers using registerRconCmdHandler


Notes

  • If you register handlers you should do so in the init() method

and call the converse method in shutdown()

  • Due to the lack of a host.unregisterHandler( method ) modules

which use host.registerHandler( method ) should include a local state variable which masks the call of these methods if the module has been shutdown. See mm_announcer for an example of this.

  • If your module registers for updates the update() method should

be clean an quick as this method will be called VERY often. Failure to do so may cause significant performance penalties ( high CPU load and lag ).

  • module rcon commands should be added via the sub command interface

see mm_sample for an example of this

  • You are encouraged to use the helper methods in mm_utils to

provide a consistent interface to kick and ban. Using these methods will ensure your code takes advantage of any enhancements that may become available in BF2 for this area in the future e.g. Player dialog messages.

  • All modules must provide a class level mm_load method which returns

the module object.

  • Modules which support reload ( __supports_reload__ = True ) must

provide an object level shutdown method.

  • It is not guaranteed that shutdown will be called on modules when

the server exits.


Debugging

Debugging support in ModManager is enabled using

modmanager.debugEnable 1
modmanager.debugFile "modmanager_debug.log"
modmanager.logLevel 10

This will create a log file in the servers main directory which will capture any error / info that is generate by your module.

State Vars
# The previous game state before the current one
mm.lastGameStatus

# The current game state
mm.currentGameStatus

# True if the current game state is bf2.GameState.Playing false otherwise
mm.gamePlaying

# True if the current round has started i.e. state is bf2.GameState.Playing
# and there are enough players to begin False otherwise
mm.roundStarted
Configuration methods
# Returns the configuration path
mm.configPath()

# Return the config filename.
mm.configFile()

# Return the modules configuration, adding any missing default values.
mm.getModuleConfig( moduleDefaults={} )

# Set the calling modules parameter.
mm.setParam( key, value )

# Add a value to the the calling modules parameters.
mm.addParam( key, value )

# Remove one of the calling modules parameter values.
mm.removeParam( key, idx )

# Return the calling modules parameter.
mm.getParam( key )

# Set the rcon modules parameter.
mm.setRconParam( key, value )

Return the rcon modules parameter.
mm.getRconParam( key )

# Save the running config
mm.saveConfig()
Logging methods
# Log the message at the given debug level.
mm.debug( level, msg )

# Log the message at the info level.
mm.info( msg )

# Log the message at the warn level.
mm.warn( msg )

# Log the message at the error level.
mm.error( msg, traceback=False )

# Returns a formatted string of the exception.
mm.exceptionString( self )
Rcon methods
# Register a new rcon function hander.
mm.registerRconCmdHandler( name, details )
# Unregister an existing rcon function handler.
mm.unregisterRconCmdHandler( name )

# Register a new rcon connect hander.
mm.registerRconConnectHandler( func )

# Unregister an existing rcon connect handler.
mm.unregisterRconConnectHandler( func )

# Register a new rcon disconnect hander.
mm.registerRconDisconnectHandler( func )

# Unregister an existing rcon disconnect handler.
mm.unregisterRconDisconnectHandler( func )

# Register a new rcon auth hander.
# auth_func should return a number indicating the authentication level
# check_func should return True or False indicating if the user is permitted
# to use the passed in rcon method
mm.registerRconAuthHandler( self, auth_func, check_func )
# Unregister an existing rcon auth handler.
mm.unregisterRconAuthHandler( func )
# Register a new rcon authed hander.
mm.registerRconAuthedHandler( func )

# Unregister an existing rcon auth handler.
mm.unregisterRconAuthedHandler( func )
Status methods
# Return how long a round has been running for.
# Takes into account start delay and any pauses.
mm.roundTime()

# Return how long a round has left to play.
# Returns 0 if there is no time limit or the round hasn't started
mm.roundTimeLeft()
Ban Manager methods
# Return the ban manager handle
mm.banManager()
Update methods
# Requests updates.
mm.registerUpdates( requestor )

# Cancel request for updates.
mm.unregisterUpdates( requestor )

mm_utils methods

# Return the name of the status
status_name( status )

# Return the number or None if invalid.
mm_utils.get_int( ctx, string, desc='number' )

# Kick a player with a reason
mm_utils.kick_player( player, msg='You are being kicked (Unknown reason)', delay=5, kick_type=KickBanType.rcon )

# Kick a player
mm_utils.kick_player_now( player, kick_type=None )

# Ban a player for a given period with a reason ( ** Depricated use mm.banPlayer(..) )
mm_utils.ban_player( player, msg='You are being banned (Unknown reason)', period=None, delay=5, ban_type=KickBanType.rcon )

# Ban a player ( ** Depricated use mm.banPlayerNow(..) )
mm_utils.ban_player_now( player, ban_type=None )

# Sends a message to a player on the server
# Note: This currently sends to the entire server as the underlying
# API is broken in this respect.
mm_utils.msg_player( playerid, msg )

# Sends a message to all players on the server
mm_utils.msg_server( msg )

# Execute a modules sub command
mm_utils.exec_subcmd( mm, subcmds, ctx, cmd )

# Return the name of the calling module
mm_utils.caller_module( level=2 )

# Return the name for the given function.
mm_utils.method_name( func )

# Split the <str> using <on> returning a list with exactly <want> members.
mm_utils.lsplit( str, on, want, default= )

# Find a player by cdkeyhash.
mm_utils.get_player_by_cd_key_hash( cdkeyhash )

# Determine the players CDKey hash.
mm_utils.get_cd_key_hash( player )


Support

Support is provided in the ModManager forums:

http://forums.multiplay.co.uk/forumdisplay.php?forumid=195

History

v1.7a

mm_rcon
* Fixed an issue mapValidateSize of coop / none standard gametypes

v1.7

modmanager
* Added a method to retrieve the rcon handle
* Version bump

mm_bf2cc
* Now uses mm_utils.get_cd_key_hash( player ) to obtain cdkeyhash's this avoids an issue in BF2142 at least where some player names break admin.listPlayers
* Added a workaround for broken BF2cc version check

mm_rcon
* Fixed a bug in map list validation which would prevent invalid maps from being removed
* Added Highway Tampa to the ranked map list
* Exposed kickPlayer, banPlayer and banPlayerId for use with IGA

mm_utils
* find_player now supports wild card matching on player name if requested

v1.6a

modmanager
* setParam is now prevented from altering mm_rcon.restrictedGametypes and mm_rcon.lockedSettings

v1.6

modmanager
* Increased error checking for config parsing
* setParam is now prevented from altering restricted parameters

mm_rcon
* Added Northern Strike maps

mm_utils
* Reverted to use server message as player message only works for player slot 0

v1.5-rc6

mm_bf2cc
* switchplayer and sendplayerchat now support player names as well as playerid's
* Added some additional comments * Added missing \n in output 
mm_utils
  • Added find_player which finds a player given either a player name or playerid
mm_rcon
* Enhanced mapRun to support None gametype / size parameters
modmanager
* Added new rcon methods runRconCommand and getRconContext

v1.5-rc5

mm_rcon
* Enhanced mapRun to deal with mixed up case maps and gametype.

v1.5-rc4

mm_utils
* Fix for largs returing invalid details if the first character was a quote

mm_rcon
* map and admin.runLevel commands now return OK to the rcon client
* N.B. No error checking is possible as the underlying rcon commands produce no output.
mm_bf2cc
* Fixed onPlayerDeath not dealing with None victim

v1.5-rc3

mm_rcon
* Corrected error in maplist.append processing

v1.5-rc2

mm_rcon
* Added basic and advanced map size validation. Advanced via map.desc is disabled by default
mm_autobalance
* Fixed off by one issue on player connect

mm_banmanager
* Now uses .search instead of .match on regexps

v1.5-rc1

mm_rcon
* Added run map ability which enhances the way bf2142 implements admin.runLevel as well as adding it to BF2
* Added rcon command: map <map> <gametype> [<size>]
* Added enhanced map management functions which enables maplist.XXXX commands to behave as expected

mm_clanmatch
* This module is now deprecated please use mm_autobalance.roundSwitch instead!

mm_autobalance
* Merged with ClanMatch and enhanced to have multiple on round change methods

v1.5-BETA4

mm_logger
* Fixed shutdown issue printing to closed file

mm_bf2cc
* Added encoding type to prevent warning when loading
modmanager
* Removed invalid supported games output

mm_announcer
* Added the ability to put the players name in join messages using the special string: %player%

mm_rcon
* Added 2142 maps
* Fixed unregister call which now gets called by bf2142

mm_autobalance
* Enhancements / fixes merged from BF2142 Closed BETA 2

v1.5-BETA3

mm_announcer
* Added supported games

mm_autobalance
* Added supported games
* Included changes from BF2142 Tuning BETA 2

mm_banmanager
* Added supported games

mm_bf2cc
* Added supported games

mm_clanmatch
* Added supported games

mm_kicker
* Added supported games

mm_logger
* Added supported games

mm_playerconnect
* Added this module based on standard_admin/playerconnect.py

mm_rcon
* Added supported games

mm_reserver
* Added supported games

mm_sample
* Added supported games

mm_tk_punish
* Added supported games

modmanager
* Added supported games

v1.5-BETA2

mm_reserver
* Corrected unescaped literal % in warning for too high reserved slots

v1.5-BETA1

mm_rcon
* Added verdun official 2142 map
* Added 2142 compatibility

modmanager
* Added 2142 compatibility
* Version bump

v1.4

mm_utils
* Activated single user messaging.

v1.4-beta2

mm_autobalance
* Added gpm_coop checks from v1.4 beta 2 patch

v1.4-beta1

modmanager
* Version bump

mm_rcon
* Added road_to_jalalabad official map

v1.3a

modmanager
* Version bump

mm_bf2cc
* Fixed player details for bots

v1.3

mm_rcon
* Added Armored Fury maps to the official map list
* Added lockedSettings config option which allows admins to lock settings from being changed
* Added allowedGametypes config option which allows admins to restrict the gametypes that can be played * Added modDir helper method

mm_autobalance
* Added gpm_coop check from v1.3 patch

v1.2

mm_banmanager
* Added dateTime and skipSave params to banPlayerKey and banPlayerAddress methods

mm_bf2cc
* Version increment

v1.2-rc10

mm_banmanager
* Added local addBan method
* Corrected cmdAddBan now correctly adds server side ban
* Corrected cmdUpdateBan now correctly removes any old ban and adds the new one
* API cleanup implementing internal __addBan __removeBan methods which are now exclusively used for manipulating the internal ban list
* Added local rcon method listBans

v1.2-rc9

mm_utils
* Added get_player_details which returns a list of players with mmDetails set. This contains cdkeyhash and port as fields.

mm_tk_punish
* Now resets player tkData before each round

mm_banmanager
* Added datetime param to updateBan and addBan rcon commands

v1.2-rc8

mm_rcon
* Enhanced error catching

mm_banmanager
* Added local ban manipulation rcon commands

v1.2-rc7

modmanager
* Swapped rcon and banManager initialisation order so that banManager can register rcon commands

mm_banmanager
* Corrected shutdown of onGameStatusChanged
* Corrected usage of ban['datetime'] and time.now() in periodic ban reads

mm_bf2cc
* Extra validation done in cmdGetPlayerHash

v1.2-rc6

mm_banmanager
* Added dateTimeFormat and oldDateTimeFormat parameter to allow for custom formats. Note all dates are stored and output in GMT.

v1.2-rc5

mm_banmanager
* A banDelay of 0 passed to banPlayer now prevents any ban message being displayed.

mm_bf2cc
* Added punished info to the player info

v1.2-rc4

mm_banmanager
* Optimised logic ( common case first ).
* Corrected typo in clearBans for time based bans.
* Now clears all legacy bans on load if a Banmanager banfile is detected and on map change. This prevents old bans creeping in unnoticed.
* Corrected availability of now variable for timed bans

v1.2-rc3

mm_banmanager
* Now only reads in server based "legacy" bans if configured banFilename doesnt exist. This prevents problems on multi server installs.

mm_bf2cc
* Now requires mm_tk_punish for so we can display punish information
* Added team kill forgive / punish information to cmdGetPlayerList

v1.2-rc2

mm_banmanager
* clearBanList now correctly clears __roundBans and __unbanTimers preventing incorrect warnings when the cleared bans expire.

v1.2-rc1

modmanager
* Bumped version number for ban manager release
* Now also searches admin/ + moduleBase + /libs for python modules

mm_reserver
* Replaced kickMessage with kickReason
* Now uses banmanager.kickPlayer hence requires MM v1.2

mm_kicker
* Removed kickMessage as its now handled via mm_banmanager
* Now uses banmanager.kickPlayer hence requires MM v1.2
* Replaced kickWordMessage with kickWordReason

mm_banmanager
* Added defaultBanCdKeyHash and defaultBanAddress config options
* Now checks to ensure that banMethod is valid and will attempt to correct based on the ban info available
* Now deals with duplicate bans within the ban message notification period
* Added kickPlayer and kickPlayerNow methods which replace those from mm_utils
* Now checks to ensure Round bans arent read back in from disk on initialisation

mm_rcon
* Now uses banmanager.kickPlayer hence requires MM v1.2
* Changed authed message format to be more prominent
* Kick and Ban methods now use advanced argument parsing which supports quoted and arguments

mm_utils
* kick_player and kick_player_now are now depricated see mm_banmanager kickPlayer and kickPlayerNow for replacements
* Added largs method for parsing arguments from a string

v1.1j

mm_banmanager
* Corrected documented defaults for defaultBanPeriod => "Perm" and defaultBanMethod => "Key"

mm_tk_punisher
* Additional error checking for punish announcements + logging of punishes
* Fixed TK announcements use of invalid victim object

v1.1i

mm_banmanager
* Added getBanList method which returns a copy of the servers current banlist hash
* Corrected banlist read in for player nick
* Renamed validateBanKey to validateBanAddressOrKey ( more appropriate name )
* Now calls validatePlayerName to determine the Player Nick in legacy methods
* Removed spurious ',' which broke banPlayerNow

mm_bf2cc
* Added serverChatFormat config option which now doesn't use large fonts by default. Prefix with ' §3 ' for large messages.

v1.1h

mm_banmanager
* Now escapes XML entities
* Added defaultBanNick
* Now validates banfile on read in fixing data if possible

mm_utils
* Added xml.sax.saxutils replacement methods xml_escape and xml_unescape

v1.1g

mm_tk_punisher
* Announcements are now logged
* Announcement errors are now dealt with

v1.1f

mm_banmanager
* Enhanced input validation to unban method

v1.1e

mm_banmanager
* Added check for invalid unban ( empty ban key / address )
* Added early determination of player: name, profileid, address and cdkey
* Enhanced error detection and recovery for delayed bans
* Added unBanReason validation
* Both admin.removeAddressFromBanList and admin.removeKeyFromBanList now return an error string if the remove failed

mm_rcon
* Updated parameter list for admin.removeAddressFromBanList and admin.removeKeyFromBanList
* Added number argument validation checks to exec overridden methods
* Both admin.removeAddressFromBanList and admin.removeKeyFromBanList now return an error string if the remove failed

v1.1d

mm_tk_punish
* Added missing configuration defaults

v1.1c

mm_banmanager
* Fixed cut and paste error in validateBanKey

v1.1b

mm_banmanager
* Added validation for ban cdkey hashes and addresses
* Fixed log entry for banPlayerAddress and banPlayerKey

v1.1a

modmanager
* Removed proxy methods for ban manager methods to reduce the coupling of mm and banmanager
* All Ban Manager methods should now be accessed via mm.banManager().<method>

mm_banmanager
* Now uses admin.addAddressToBanList and admin.addKeyToBanList as a backup to admin.banPlayer and admin.banPlayerKey
* Corrected inverted use of admin.banPlayer and admin.banPlayerKey
* Added banPlayerAddress and banPlayerKey methods for adding manual bans
* Ban file is now valid XML i.e. contains a header and a root <banlist> node
* unbanPlayer now logs at level info
* clearBanList now logs at level info
* Added banMessage, defaultBanReason, defaultBanDelay and defaultBanPeriod config parameters
* Added validation of banPeriod, banReason, banDelay, banType and bannedBy
* Now also issues a kick to a player when they are banned to workaround bans issued in the early stages of a player connecting failing to activate
* Now deals with from now and epoc bans
* Added expireBan
* unbanPlayer now takes an optional reason

mm_rcon
* Now correctly deals with admin.addAddressToBanList and admin.addKeyToBanList including an extended 3rd argument "reason"
* Fixed admin.banplayer ban type
* exec admin.banPlayer and exec admin.banPlayerKey now support an extended 3rd argument "reason"
* Added banby rcon command which takes a parameter denoting who did the ban
* Unban now takes an optional reason

mm_utils
* Now uses self.mm.banManager().<method>
* banReason's now default to None see: mm_banmanager.defaultBanReason
* banPeriod's now default to None see: mm_banmanager.defaultBanPeriod
* get_cd_key_hash now caches the players cdkey for faster access

mm_tk_punish
* Now uses self.mm.banManager().<method>
* Config option banMessage replaced by banReason for ban manager compatibility

mm_kicker
* Now uses self.mm.banManager().<method>
* Now requires ModManager version 1.1
* Config option banWordMessage removed and replaced with banWordReason for ban manager compatibility

v1.1

modmanager
* Added Ban Manager proxy methods

mm_rcon
* Error case trap for connection reset added
* Added banlist rcon method
* Added clearbans rcon method
* Added unban rcon method
* Updated ranked restricted maps for BF2 v1.2 patch
 
mm_banmanager
* Error case trap for player.getName() failing added
* Added banlist method

v1.1-beta2

mm_rcon
* Added maplist rcon command which has a low auth level for use with bf

v1.1-beta1

modmanager
* Fixed random module dependency load problem

mm_utils
* Added a default for mmKickReason to kick_player_now
* Added a default for mmBanReason to ban_player_now
* Now delegates bans to the Ban Manager
* Added get_player_by_cd_key_hash method
* Added get_cd_key_hash method

mm_tk_punisher
* Added Punish / Forgive announcements ( original idea from Battlefield.no )
* Now uses the ban manager to execute bans
* Now requires ModManager version 1.1

mm_banmanager
* Initial version

mm_rcon
* Now uses the Ban Manager for baning players
* Now requires ModManager version 1.1

v1.0j

mm_bf2cc
* Fixed formatting issues
* Now only compatible with 4.6 or later only client

mm_clanmatch
* Enabled roundSwitch config option

mm_rcon
* Fix for errors on accept causing rcon to stop functioning

v1.0i

mm_bf2cc
* Fix for maplist causing the server to crash
* Fix for player hash pattern match and LAN servers

v1.0h

Private release 

v1.0g

Private release

v1.0f

Private release

v1.0e

mm_bf2cc
* Added methods to report player hashes
* Removed reporting of ticketChangePerSecond to prevent overflow errors

v1.0d

mm_rcon
* Added Special Forces official Maps

mm_clanmatch
* Initial Version

v1.0c

mm_rcon
* Fixed logCommands option

mm_clanmatch
* New module which enables teams to be automatically switched at the end of round.

v1.0b

mm_bf2cc
* Fix for getRootParent being removed from constants.py in BF2 1.03, this fixes vehicle reporting
* Added a compatibility version which will enable older BF2CC clients and daemons to connect if no protocol changes have occurred

v1.0

modmanager
* Corrected autoSave ( still unreliable as the servers doesnt call shutdown most the time )

mm_rcon
* Added new offcial map
* Added rcon methods profileid and profileids. N.B. profileid is an unauthed method

mm_tk_punish
* Incorporated BF2 1.03 patch changes ( ban now uses key and artillery kills are no longer counted )

v1.0-final-b1

mm_rcon
* Fix for BF2CC maplist management ( strips quotes from map names )

v1.0-rc5

modmanager
* Added configPath() method
* Updated time logic to take into account none started matches and correct roundTimeLeft()

mm_rcon
* Added log option for all commands used
* Added checks for official maps on ranked servers
* Added flush on DOS disconnects

mm_kicker
* Corrected round check
* Changed default negative kick to -15
* Updated ban checks to corrected variable name
* Now only switches dead players if the game is in progress.

mm_bf2cc
* Now requires version 1.9 of the mm_kicker

v1.0-rc4

modmanager
* shutdown() and init() are now manditory methods for modules
* Added startTimeWall and startTimeUTC properties which identifies then the round
started excluding start delay
* Added roundTime() and roundTimeLeft() methods which return the number of seconds
the round has been playing for and has left respectively. Pauses and start delay
are taken into account

mm_bf2cc
* Removed \n from server name in si response
* Updated to use mm methods for round times

mm_rcon
* Corrected unauthorised message print
* Extra security checks now prevent the use of blank passwords
* Fixed users command
* Added extra exception check

mm_announcer
* Corrected Rcon commands docs
* Updated line split '|' to work consistently across join and timed messages

mm_kicker
* Added idleIgnoreNotStarted defaults to 1 which means idle kicks are disabled
  while the round has not started ( below min players to start )
* Disabled enhanced debug in main kick routine
* Now detects bad language in the first word of dead messages
* Added negative score kick
 
mm_utils
* Removed prefix param from MsgChannel constuctor.
* MsgChannel.stripPrefix now removes all known prefixes for all channels
* Added status_name which will return a string of the passed in GameState

v1.0-rc3

mm_kicker:
* Fixed typo's in "message" variables ensure your modmanager.con is correct

mm_announcer:
* Fixed module shutdown error

mm_sample:
* Added missing mm.unregisterRconCmdHandler to shutdown

mm_bf2cc:
* Now requires mm_kicker v1.7

v1.0-rc2

Fixes for mm_kicker not loading on ranked servers when configured for high ping kick lower than 160.

v1.0-rc1

Initial public release


Licence

This software is free to use in any situation given. Any bugs found must be reported to the author. This software is released under "The Artistic License" see mm_licence.txt for more details