Raised This Month: $32 Target: $400
 8% 

[ANY] SourceComms (0.9.266 - 22/11/2014)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
ppalex
Senior Member
Join Date: Nov 2012
Location: Russia, near the Moscow
Plugin ID:
3500
Plugin Version:
0.9.266
Plugin Category:
Admin Commands
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
    Plugin Description:
    Providing extended, temporary and permanent punishments (for chat, voice) with full history storing in sourcebans system.
    Old 01-30-2013 , 17:42   [ANY] SourceComms (0.9.266 - 22/11/2014)
    Reply With Quote #1

    Latest files and instructions you could find on GitHub
    Links:
    Requirements
    • Working sourcebans system (yes, you need MySQL server and web server with PHP). Currently supported versions 1.4.* (and 1.5.0 for sourcebans plugin). Integration into sourcebans 2.0 currently in development.
    • SM version 1.5.0-hg3761 or higher
    • SourceMod version 1.5.3 or 1.6 is required to compile the plugin (compiled plugin also works on sm 1.5)

    Plugin based on ExtendedComms (Twisted|Panda) & SourceBans (SourceBans Development Team) plugins. Thanks them for code and idea. :wink:

    Features:
    • 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 storing 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 :oops:
    • 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 removed 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).
        Immunity checking system could be disabled by setting "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 updater

    Sample of web-part you may look there http://test-bans.tf2news.ru/index.php?p=commslist (Login/pass test/test)
    Web part provides the following functionality:
    • 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 (sweet :) )

    Commands:
    The time parameter controls how long the player is punished. (< 0 == Temporary, 0 == Permanent, # == Minutes). If not specified it will be "DefaultTime" minutes (30 by default)
    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.
    • sm_comms
      Shows to player their communications status. (Also may used in chat)
    • 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.

    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 with time > 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
    Installation of server part
    A sourcecomms-srv.zip file that provide all the necessary files, which can simply be extracted to your SourceMod directory. However, this is where the files go:
    Code:
    - sourcecomms.smx into /sourcemod/plugins/
    - sourcecomms.phrases.txt into /sourcemod/translations/
    - sourcecomms.cfg into /sourcemod/configs/sourcebans/
    You need to add database record "sourcecomms" to your /sourcemod/configs/databases.cfg
    Database Config (sample):
    Code:
    	"sourcecomms"
    	{
    		"driver"			"mysql"
    		"host"				"your_mysql_host"
    		"database"			"your_sourcebans_database"
    		"user"				"your_mysql_login"
    		"pass"				"******"
    		//"timeout"			"0"
    		"port"			"3306 or your_database_port"
    	}
    (Optional) Edit /addons/sourcemod/configs/adminmenu_sorting.txt. Find } at the end of file and add before:
    Code:
    "sourcecomm_cmds" 
    { 
        "item" "sourcecomm_gag" 
        "item" "sourcecomm_mute" 
        "item" "sourcecomm_silence" 
        "item" "sourcecomm_ungag" 
        "item" "sourcecomm_unmute" 
        "item" "sourcecomm_unsilence" 
        "item" "sourcecomm_list" 
    }

    Installation of database part
    Execute the following query below (but first - check your table prefix!! replace sb to yours, if you uses another) on your sourcebans database:
    Spoiler
    Also, you could import attached sb_comms.sql.txt file instead of copying code from this post.

    After this, If you want to import punishments from ExtendedComm plugin, execute folowing queries on your sourcebans database (check sourcebans table prefix and extendedcomm table name. If you have different prefix or table_name - replace their in code below to your values. if extendedcomm table is in a different database - replace in code below extendedcomm to 'database_with_table'.'name_of_extendedcomm_t able'):
    Code:
    INSERT INTO sb_comms (authid, name, created, length, ends, reason, type) SELECT steam_id, "", mute_time, mute_length, mute_time+mute_length, mute_reason, 1 FROM extendedcomm WHERE (mute_type='1' OR mute_type='2');
    INSERT INTO sb_comms (authid, name, created, length, ends, reason, type) SELECT steam_id, "", gag_time, gag_length, gag_time+gag_length, gag_reason, 2 FROM extendedcomm WHERE (gag_type='1' OR gag_type='2');
    Also, you could import attached import.sql.txt file instead of copying code from this post.

    Installation of Web part
    Place files from sourcecomms-web.zip archive to your sourcebans web folder. Then you need to edit a few files (make backup before you doing this!!!) Instructions for edit are placed in files_to_edit.txt or under spoiler below
    Spoiler


    Plugin tested and works fine on TF2, CS:S, CS:Go servers.
    Attached Files
    File Type: txt files_to_edit.txt (20.3 KB, 3187 views)
    File Type: txt import.sql.txt (421 Bytes, 2651 views)
    File Type: txt sb_comms.sql.txt (855 Bytes, 2869 views)
    File Type: smx sourcecomms.smx (39.0 KB, 2975 views)
    File Type: sp Get Plugin or Get Source (sourcecomms.sp - 2629 views - 109.7 KB)

    Last edited by ppalex; 03-20-2016 at 09:21. Reason: updated to 0.9.266
    ppalex is offline
    ppalex
    Senior Member
    Join Date: Nov 2012
    Location: Russia, near the Moscow
    Old 01-30-2013 , 17:44   Re: SourceComms
    Reply With Quote #2

    For plugin developers
    SourceComms releases several natives to provide compatibility with other plugins and for additional functionality.

    These natives to set client status:
    • native bool:SourceComms_SetClientMute(client, bool:muteState, muteLength = -1, bool:saveToDB = false, const String:reason[] = "Muted through natives")
      Sets a client's mute state.
    • native bool:SourceComms_SetClientGag(client, bool:gagState, gagLength = -1, bool:saveToDB = false, const String:reason[] = "Gagged through natives")
      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 or gagState==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
        if true - punishment will be saved in DB (maybe not immediately). Default value is false.
      • String reason
        reason of punishment which will displayed and (possibly) saved into DB. Default value is Muted through natives or Gagged 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 or BaseComm_SetClientGag.
    • For example, equivalent of BaseComm_SetClientMute(client, true) is SourceComms_SetClientMute(client, true, -1, false); also it may be SourceComms_SetClientMute(client, true, _, _) or simple SourceComms_SetClientMute(client, true).
    • Removing player's punishments from DB through natives are not available at this moment.

    Natives to get client status:
    • 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.

    Changelog
    Spoiler

    Last edited by ppalex; 11-22-2014 at 12:10. Reason: upd 0.9.265
    ppalex is offline
    Oshizu
    Veteran Member
    Join Date: Nov 2012
    Location: Warsaw
    Old 01-30-2013 , 17:47   Re: [source 2009] SourceComms (0.7.111-beta)
    Reply With Quote #3

    Nice userful thingy it seems to be . I'il check it out soon and you should attach compiled .smx file. If Get Plugin is not working because of non-sm original include files
    __________________
    ...

    Last edited by Oshizu; 01-30-2013 at 17:48.
    Oshizu is offline
    ppalex
    Senior Member
    Join Date: Nov 2012
    Location: Russia, near the Moscow
    Old 01-30-2013 , 17:53   Re: [source 2009] SourceComms (0.7.111-beta)
    Reply With Quote #4

    Quote:
    Originally Posted by Oshizu View Post
    Nice userful thingy it seems to be . I'il check it out soon and you should attach compiled .smx file. If Get Plugin is not working because of non-sm original include files
    I forget about updater... Fixed.
    ppalex is offline
    ppalex
    Senior Member
    Join Date: Nov 2012
    Location: Russia, near the Moscow
    Old 01-30-2013 , 18:34   Re: [source 2009] SourceComms (0.7.113-beta)
    Reply With Quote #5

    Uploaded zip archive with plugin config and translation.
    ppalex is offline
    ppalex
    Senior Member
    Join Date: Nov 2012
    Location: Russia, near the Moscow
    Old 01-31-2013 , 05:40   Re: [source 2009] SourceComms (0.7.113-beta)
    Reply With Quote #6

    Added web-part files and installation instructions. Also added sql queries for import punishments from ExtendedComm plugin.
    ppalex is offline
    Root_
    Veteran Member
    Join Date: Jan 2012
    Location: ryssland
    Old 01-31-2013 , 06:27   Re: [source 2009] SourceComms (0.7.114-beta)
    Reply With Quote #7

    Interesting idea!
    I'd recommend you to disable basecomm plugin at all (ie move to disabled folder), and add gag/mute/silence functions in this plugin (and possibly add menu with 'for how long time punish player')

    I havent tested it yet, but I think when you will choose a player from a menu, it will block player only for session (aka default one) or will reply 'usage: sm_command userid time reason'
    __________________


    dodsplugins.com - Plugins and Resources for Day of Defeat
    http://twitch.tv/zadroot
    Root_ is offline
    ppalex
    Senior Member
    Join Date: Nov 2012
    Location: Russia, near the Moscow
    Old 01-31-2013 , 07:04   Re: [source 2009] SourceComms (0.7.114-beta)
    Reply With Quote #8

    Quote:
    Originally Posted by Root_ View Post
    Interesting idea!
    I'd recommend you to disable basecomm plugin at all (ie move to disabled folder), and add gag/mute/silence functions in this plugin (and possibly add menu with 'for how long time punish player')

    I havent tested it yet, but I think when you will choose a player from a menu, it will block player only for session (aka default one) or will reply 'usage: sm_command userid time reason'
    I thought about it. It would be difficult and inappropriate - i would need to re-implement all the functionality of the plugin basecomm. In addition to basecomm plugin version 1.5.0-hg3761 or newer should work well.
    Spoiler
    ppalex is offline
    Root_
    Veteran Member
    Join Date: Jan 2012
    Location: ryssland
    Old 01-31-2013 , 07:47   Re: [source 2009] SourceComms (0.7.114-beta)
    Reply With Quote #9

    Revienting a wheel isnt very motivated. However, I think plugin will be more popular if you will implement it. I seen a plugin that showing additional menu on stock sourcemod command (kick?) so just take a look at this, and if possible implement an additional menu to it
    __________________


    dodsplugins.com - Plugins and Resources for Day of Defeat
    http://twitch.tv/zadroot
    Root_ is offline
    ppalex
    Senior Member
    Join Date: Nov 2012
    Location: Russia, near the Moscow
    Old 01-31-2013 , 07:54   Re: [source 2009] SourceComms (0.7.114-beta)
    Reply With Quote #10

    Quote:
    Originally Posted by Root_ View Post
    Revienting a wheel isnt very motivated. However, I think plugin will be more popular if you will implement it. I seen a plugin that showing additional menu on stock sourcemod command (kick?) so just take a look at this, and if possible implement an additional menu to it
    I do not understand the meaning of integration basecomm in my plugin.
    functionality of one or two plug-in aggregate - the same

    Also I think, that replacement the default plugin is a bad thing for most of admins.

    Last edited by ppalex; 01-31-2013 at 08:20.
    ppalex is offline
    Reply


    Thread Tools
    Display Modes

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 11:47.


    Powered by vBulletin®
    Copyright ©2000 - 2024, vBulletin Solutions, Inc.
    Theme made by Freecode