A sourcemod plugin, which provides extended, temporary and permanent punishments with full history storing in sourcebans system. Also includes files and instructions to integration to existing sourcebans web-pages.
- Working sourcebans system (yes, you need MySQL server and web server with PHP). Currently supported versions 2.0.
- SourceMod 1.5.0-hg3761 or newer is required to use plugin on server.
- SourceMod 1.6 is required to compile the plugin. (Compiled plugin also works on SourceMod 1.5)
##Compatibility:
- In theory - all games on the Source 2009 engine.
- Plugin tested on TF2, CS:S, CS:GO servers.
- Provides a straightforward category in the sm_admin menu where administrators can punish players as well as view current comm punishments.
- The original BaseComm menu option still exist, and will still function.
- SourceComms plugin support toring history of punishments from BaseComm and another plugins.
- The category provides options for issuing new punishments, removing and viewing current punishments (categorized based on the punishment), as well as a List feature that provides information about current punishments.
- The category also modifies the player's names in all of the options to show what their current punishment is. [ ] = None, [G] = Gagged, [M] = Muted, [S] = Silenced. I used Twisted|Panda menu code :)
- All punishments (temporary, extended or permanent) are saved in MySQL database and are automatically reapplied (except temporary) when the punished player connects to the server. This allows punishments to be applied across multiple servers.
- Extended punishments will automatically expire in-game at the designated time.
- Permanent punishments remain on the player until an administrator removes them.
- If the server has problems with access to the database, the punishments will store in SQLite database and would be added in the main database when connection is restored. (like in sourcebans plugin, yes)
- Also you could apply punishments to multi-targets (such as
@all
,@ct
,@blue
, etc...):- Multi-target punishments will not be saved in db.
- Removing punishments from multi-targets will remove punishments temporary (not from db).
- Allowed session (temporary) punishments and extended with length less than 30 minutes and less than
DefaultTime
setting. - Permanent multi-target punishments is not available.
- SourceComms has support for protecting current punishments based on immunity levels.
- When a punishment is issued, the administrator responsible has their immunity level attached to the punishment. In order to remove that punishment, the second administrator must have higher immunity level or special admin flag (ADMFLAG_CUSTOM2 by default. You may change it in sourcecode). Also, punishment can be removed by console or his author.
- Punishments issued by CONSOLE has some immunity level (which is set in config, option "ConsoleImmunity").
- Immunity checking system could be disabled by setting option "DisableUnblockImmunityCheck" to value 1 in config file.
- One more important moment. When somebody removes punishment - plugin retrieves "punishment issuer admin id" from database. If the request fails - punishment could be temporary removed (on server, not in database) only by console, admin with special flag or with higher immunity.
- Plugin has Servers White List feature. If enabled, plugin will apply on players punishments only from current server or servers listed in White List.
- Punishments reasons and times stored in config. More details about config listed below.
- SourceComms supports auto-update.
Note: not all of this was implemented in SourceBans 2 plugin at this moment.
- Full punishments history (includes time, server, admin, reason, block length, comments, etc).
- Showing type of block as icon in first column.
- Showing count of other blocks for this player (steam-id) at the right end of 'Player Name' column (This allows you to quickly identify regular offenders).
- Admins with necessary rights could edit, delete blocks, and also "ungag" or "umnute" (like unban) player.
- If the block is still in effect, during unblocking or deleting, web-part sends command for ungag or unmute player to all servers.
- Search field for quick punishments search on all pages and advanced search options on Comms page.
- Admin-page 'Comms' for adding new punishments.
- Command 'Block comms' in player context menu on servers page
Sample of web-part (old version) you may look there (Login/pass test
/test
)
##Commands:
sm_comms
- Shows to player their communications status. (Also may be used in chat as/comms
)sm_mute <player> <optional:time> <optional:reason>
- Removes a player's ability to use in-game voice.sm_gag <player> <optional:time> <optional:reason>
- Removes a player's ability to use in-game chat.sm_silence <player> <optional:time> <optional:reason>
- Removes a player's ability to use in-game voice and chat.sm_unmute <player> <optional:reason>
- Restores a player's ability to use in-game voice.sm_ungag <player> <optional:reason>
- Restores a player's ability to use in-game chat.sm_unsilence <player> <optional:reason>
- Restores a player's ability to use in-game voice and chat.
The player parameter could be Name (only as single word, without whitespaces), UserID (#127
) or magic targets (like @all
or @red
). Look at sourcemod wiki for more details about targets.
The time parameter controls how long the player is punished. (< 0
== Temporary, 0
== Permanent, #
== Minutes). If not specified it will be "DefaultTime" minutes (default value is 30).
##Cvars:
sourcecomms_version
- plugin version
##Config settings:
DefaultTime
. When admin run sm_gag (mute, silence) command only with player name - player will be gagged on "DefaultTime" value minutes. (if "DefaultTime" setted in -1 -> player will be blocked only on session (until reconnect)). Value 0 (permanent) is not allowed.DisableUnblockImmunityCheck
(0, 1). Default value is 0. If setted to 1, player can be ungagged only by issuer admin, console or admin with special flag. Also, If 0 player maybe unblocked by Admin with higher immunity level than issuer admin had.ConsoleImmunity
. Default value is 0. Immunity Level of server console.MaxLength
, which works following way: Plugin will hide (for admins without ADMFLAG_CUSTOM 2) from menu all durations more than MaxLength and restricts punishments commands withtime > MaxLength
argument (or permanent).OnlyWhiteListServers
. Default value is 0. Set this option to 1 to applying on players punishments only from this server and servers listed in WhiteList. Value 0 applies on players punishments from any server.
##Installation instructions First of all, download this repository as a zip file. ###Installation of server part
-
Upload all the contents of
game_upload
directory from the zip file to your gameserver into/addons/sourcemod
folder. -
Upload all the contents of
web_upload
directory from the zip file to your web server into "root" (it containsapplication
orframework
folders) sourcebans folder. -
(Optional) Edit
/addons/sourcemod/configs/adminmenu_sorting.txt
. Find}
at the end of file and add before:"sourcecomm_cmds" { "item" "sourcecomm_gag" "item" "sourcecomm_mute" "item" "sourcecomm_silence" "item" "sourcecomm_ungag" "item" "sourcecomm_unmute" "item" "sourcecomm_unsilence" "item" "sourcecomm_list" }
-
Go to the sourcebans settings page and install SourceComms plugin.
Tools or instructions for importing punishments from old SourceComms and ExtendedComm plugins are still in development.
SourceComms releases several natives to provide compatibility with other plugins and for additional functionality.
native bool:SourceComms_SetClientMute(client, bool:muteState, muteLength, bool:saveToDB, const String:reason[])
- Sets a client's mute state.native bool:SourceComms_SetClientGag(client, bool:gagState, gagLength, bool:saveToDB, const String:reason[])
- Sets a client's gag state.- Parametrs:
client
- Client index. Client index must be valid (0 < client < MaxClients
) and client must be in game (IsClientInGame(client) == true
).- bool
muteState
|gagState
-true
to mute (or gag) client,false
to unmute (ungag). - Next parameters applies only for muting or gagging (
muteState==true
orgagState==true
).muteLength
|gagLength
- length of punishment in minutes. Value< 0
muting (gagging) client for session (until reconnect). Permanent (0
) is not allowed. Default value is-1
.- bool
saveToDB
- iftrue
- punishment will be saved in DB (maybe not immediately). Default value isfalse
. - String
reason
- reason of punishment which will displayed and (possibly) saved into DB. Default value isMuted through natives
orGagged through natives
.
- Natives returns
true
if this caused a change in mute or gag state,false
otherwise. - It's recommended to use these natives instead of
BaseComm_SetClientMute
orBaseComm_SetClientGag
. - For example, equivalent of
BaseComm_SetClientMute(client, true)
isSourceComms_SetClientMute(client, true, -1, false)
; also it may beSourceComms_SetClientMute(client, true, _, _)
or simpleSourceComms_SetClientMute(client, true)
. - Removing player's punishments from DB through natives are not available at this moment.
native bType:SourceComms_GetClientMuteType(client)
- Returns the client's mute type.native bType:SourceComms_GetClientGagType(client)
- Returns the client's gag type.- Parametrs:
client
- Client index, it must be valid and client must be in game.
- Natives returns one of enum
bType
values, which can be:bNot
- Player chat or voice is not blocked.bSess
- Player chat or voice is blocked for player session (until reconnect) (like in basecomm plugin).bTime
- Player chat or voice is blocked for some time.bPerm
- Player chat or voice is permanently blocked.
- Twisted|Panda for his ExtendedComm plugin, which inspired me and was the basis for my plugin.
- SourceBans Development Team for their SourceBans plugin.
- killerps for Polish translation.
- StayOx for Portuguese (Brazilian) translation.
- winter for Deutsch translation.