VoiceSpam: impose a limit on the amount of taunts a player can send per match
=============================================================================	version 1.0
																				by "adminthis"

Overview:
#########
This serveractor keeps track of how many taunts each player has broadcast during the match. If it exceeds a predefined limit, their ability to send further voice messages is revoked. Features include:

* Define the maximum allowed amount of messages sent per player, per match.
* Reinforce the voice message block of players that rejoin.
* Send a custom message to the player, informing him/her of the block.
* Broadcast a custom message to other players informing them of the player's block.
* Team games support: do not count team taunts (orders, friendlyfire etc.) or include all taunts.
* Disable taunts entirely for all players.

History:
########
version 1.0 [30-9-2008]
- Initial release.


Installation:
#############
Extract 'VoiceSpam.u' and 'VoiceSpam.ini' to the ..\UnrealTournament\System folder of your server.
Open the ini file of the server (default: UnrealTournament.ini) and add the following entry under [Engine.GameEngine]:

ServerActors=VoiceSpam.VoiceSpam

The result might look similar to this:
[Engine.GameEngine]
MinClientVersion=432
CacheSizeMegs=4
UseSound=True
ServerActors=IpDrv.UdpBeacon
ServerActors=IpServer.UdpServerQuery
ServerActors=IpServer.UdpServerUplink MasterServerAddress=unreal.epicgames.com MasterServerPort=27900
ServerActors=IpServer.UdpServerUplink MasterServerAddress=master0.gamespy.com MasterServerPort=27900
ServerActors=UWeb.WebServer
ServerActors=VoiceSpam.VoiceSpam


Configuration:
##############
The file VoiceSpam.ini contains the settings.

MaxMsg [default value: 20]
--------------------------
The amount of messages a player can send per match. Once it has reached this number, the player can no longer send voice messages for the remainder of the match.

bReinforce [default value: True]
--------------------------------
If True, the voice message block of a player is reinforced if he/she rejoins during the current match. Set to False if rejoining should clear the block.

bPlayerMsg [default value: True]
--------------------------------
If True, the player will be informed about exceeding the MaxMsg limit.

MsgToPlayer [default value: You have reached the maximum amount of taunts allowed for this match.]
--------------------------------------------------------------------------------------------------
If bPlayerMsg=True, this message is sent to a player when exceeding the MaxMsg limit. If bReinforce=True, this message is also shown upon rejoining the match.

bBroadcast [default value: True]
--------------------------------
If True, other players will be informed of the voice message revocation.

MsgToBroadcast [default: The voice message capabilities of %Player% have been revoked.]
---------------------------------------------------------------------------------------
If bBroadcast=True, this message is sent to other players when someone has exceeded the MaxMsg limit. This message contains a special part: %Player%. This MUST be in the message since it serves as a placeholder for the playername of the player that has exceeded the limit. You could create your own message as follows:

For illustrative purposes, let's assume we have a player called Tom. We would like the message to say "The voice of Tom is gone!", instead of the default message. In that case, you would enter MsgToBroadcast=The voice of %Player% is gone!

This message is not broadcast for players that rejoin or when bDisableTaunts=True.

bTeamGames [default value: True]
--------------------------------
This setting is not applicable to non team games.

If True, team messages (acknowledgments, orders, etc.) also count towards a player's MaxMsg limit. If False, team taunts are ignored. Ignoring these opens the possibility for players to spam team messages (such as "Got it!" and "Defend the base.") to their team mates indefinitely. Note: once a player has exceeded the MaxMsg limit, he/she loses the ability to send ANY taunts, including team taunts.

In non team games, all taunts count towards the MaxMsg limit of a player (equal to bTeamGames=True).

bDisableTaunts [default value: False]
-------------------------------------
If True, taunts are blocked in its entirety. Set this to True if you want to disable taunts on your server.


Known Bugs & Limitations
------------------------
Player shown in voice menu: if the game is a team game and bTeamGames=True, both teams are assigned an invisible "player" that tracks voice messages. It should normally not show up in the game, but is erroneously listed in the voice message menu as "Player". This player cannot affect anything; it's merely an issue of aesthetics.

Multiple people playing from the same connection: if bReinforce=True, other players that share an Internet connection with a player in the game that has exceeded its limit, will also get their voice message sending capabilities revoked for the remainder of the match.

Team games with more than two teams: bTeamGames=True is not supported for multi-team games.


Notes:
######
Source code is available in the ../Source folder. I hope this is of help to others, just as their code was of help to me :)


Credits/Questions:
##################
nogginBasher (also thank him for the idea) ...and all others whose code examples have been of invaluable help!

If you've got a question, suggestion or bug report, please post in the appropriate topic at http://www.unrealadmin.org/forums/ or send me, that is "adminthis", a PM on aforementioned website.