In original MOH:AA, the game installation directory is used to store mods and data, it's not the case in OpenMoHAA as it uses the home directory by default to write data in here, and the home directory can be used to store mods. This behavior can be changed:
The network settings can be adjusted to use either IPv4, IPv6, or both. By default, IPv6 is disabled on dedicated servers. The following commands adjust network settings:
-`set net_enabled 1`: This enables IPv4 only (the default setting for dedicated servers).
*Note: The master server (using the GameSpy protocol) does not support IPv6. If IPv4 is disabled, the server won't appear in the online server list for internet games, even if IPv6 is enabled.*
A new variable, `sv_netoptimize`, enables a feature that optimizes network bandwidth by not sending players information about others they can't see. For each client, the server optimizes by only transmitting data about players within their view. Clients will not receive information about players they can't see. This feature also helps protect against cheaters:
This option exists since **Medal of Honor: Allied Assault Breakthrough** 2.30, however it was improved in OpenMoHAA: sounds like footsteps will be sent so players don't get confused.
A new feature was introduced to ban IP addresses, thanks to the [ioquake3](https://ioquake3.org/) project. Bans are saved by default in `serverbans.dat` but it can be modified with the `sv_banFile` variable. Here are commands to manage bans:
|rehashbans | |Loads saved bans from the banlist file
|listbans | |Lists all banned IP addresses
|banaddr |ip[*/subnet*] \| clientnum [*subnet*] |Bans an IP through its address or through a client number, a subnet can be specified to ban a network range
|exceptaddr |ip[*/subnet*] \| clientnum [*subnet*] |Adds an IP as an exception, for example IP ranges can be banned but one or more exceptions can be added
|bandel |ip[*/subnet*] \| num |Unbans an IP address or a subnet, the entry number can be specified as an alternative
|exceptdel |ip[*/subnet*] \| num |Removes a ban exception
-`banaddr 192.168.5.2` will ban the IP address **192.168.5.2**.
-`banaddr 192.168.1.0/24` will ban all **192.168.1.x** IP addresses (in the range **192.168.1.0**-**192.168.1.255**).
-`banaddr 2` will ban the IP address of the client **#2**.
-`banaddr 4 24` will ban the subnet of client **#4** - i.e if client .**#4** has IP **192.168.8.4**, then it will ban all IPs ranging from **192.168.8.0**-**192.168.8.255**.
-`exceptaddr 3` will add the IP of client **#3** as an exception.
-`bandel 192.168.8.4` will unban **192.168.8.4**.
-`bandel 192.168.1.0/24` will unban the entire **192.168.1.0** subnet (IP ranging from **192.168.1.0**-**192.168.1.255**).
## Flood protection differences with MOH: Spearhead
Flood protection is turned on by default in all games (`sv_floodProtection 1`).
- In MOH: Allied Assault and OpenMoHAA, flood protection checks all commands.
- In MOH: Spearhead 2.0 and later, flood protection only checks for text messages.
While flood protection prevents spam, it can sometimes be annoying in certain situations like reloading and checking scores within a short period of time. If needed, it can be disabled with `set sv_floodProtection 0`.
For more details on preventing message spamming, check out the [Chat](#chat) section below.
Temporarily disabling text messages can be useful in situations where tensions arise in the chat. Otherwise, it's best to keep them enabled under normal circumstances.
This setting prevents clients from joining a team if that team already has more players than the others. By default, it's turned off, but it can be switched on with the command `set g_teambalance 1`.
This feature is passive: it only checks the team sizes when someone tries to join, so it won't automatically balance teams during the game.
*Note: This check doesn't apply in server scripts; it only works when clients join teams directly.*
Bots can be used for testing. They don't move by default, so a mod will be needed, like [eaglear bots](https://www.moddb.com/mods/medal-of-honor-world-war-1/downloads/moh-eaglear-bots):
-`set sv_minPlayers x`: optional, can be used to set the minimum number of players that the server should have. Bots will be spawned based on the minimum number of players.