|
Senior Member
Join Date: Nov 2012
Location: Russia, near the Moscow
|
01-30-2013
, 17:44
Re: SourceComms
|
#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
Code:
* **0.9.266** - Added Spanish translation. Thanks to Sarona.
* **0.9.265** - Updater's url changed to the new domain.
* **0.9.264** - Updated English translation. Thanks to Nomy.
* **0.9.263** - Fixed SourceComms_SetClientMute params description. Thanks to Bara.
* **0.9.262** - Fixed plugin include file to prevent compiling errors when twice included.
* **0.9.260** - Added Deutsch translation. Thanks to winter
* **0.9.259** - Fixed bug with loading issuer admin's authid.
* **0.9.257** - Fixed bug (creating unused file %s is gagged from web on server) with logging gags from web. Thanks to reji.
* **0.9.256**
* Added Portuguese translation. Thanks to StayOx.
* Removing quotes and whitespaces from reason.
* Fixed reason loss in ungag/unmute console commands.
* Fixed wrong fail state messages.
* Fixed memory leak in unblock function.
* Fixed bug with showing "unblocked" message if player wasn't unblocked.
* **0.9.242** - Fixed bug with removing temporary punishments by admins without special flag and greather immunity level. Thanks to White Wolf for reporting and fix testing.
* **0.9.233**
* Added ability to use @all, @blue, @ct, etc. as punishment target (without saving to DB).
* Added ability to temporary mass-removing punishements (with @all, @blue, @ct, etc targets) - without removing from DB.
* Fixed bugs with permissions check on removing punishments.
* Fixed bug with unsilence on players which has combination of temp and time/perm punishments.
* Fixed bug with broken mysql connection encoding after reconnect. Supported on SM builds greather than **1.6.0-dev+3947**.
* Now plugin uses common sourcemode logs for errors and messages. You can delete sourcecomms.log file from your sourcemod logs folder.
* Removed ServerID auto-detection. You must specify it in the sourcebans config.
* Some bugs fixes.
* Code improvements.
* **0.9.9** - Added Polish translation. Thanks to killerps.
* **0.9.7** - Added the ability to use the player's name in quotes in console commands. Request from lyric.
* **0.9.1**
* Plugin was approved! Many thanks to alongub.
* No changes were made, only version bump.
* **0.8.257**
* Now already punished players are hided from menu. Thanks for idea to wingblack.
* Allowed to use serverID = 0. Request from bottiger.
* **0.8.253**
* A lot of code was refactored.
* Added *Servers White List* feature. More details in README.
* Fixed console immunity value for punishments received from web.
* Added **natives** for . More details in README.
* Fixed bug with unblocking commands, if they were called by console.
* **0.8.158**
* Fixed `Unknown command` reply in client console.
* Fixed/added SQL-escaping to prevent SQL-injections.
* Changed way of connecting to database, added checking for *connection lost*.
* Fixed bug with unicode symbols in entries from queue.
* Fixed bug with only one punishment per steam-id could be saved in queue.
* Fixed bug with `MaxLength` checking, which doesn't work correctly for admins with `UNBLOCK_FLAG`.
* Some optimizations of SQL-queries.
* Improved plugin state *consistency* with unstable database connection.
* Other code improvements. Thanks to alongub.
* **0.8.89** - Fixed bug with MaxLength checking in console commands.
* **0.8.88**
* Added `MaxLength` option to config. See plugin config for mor details.
* Fixed admin immunity determination in sql queries.
* Added setting up console immunity on block fetching.
* **0.8.79** - Added colored prefix to all output messages.
* **0.8.75**
* Code improvements.
* Fixed some mistakes in actions logging.
* **0.8.65**
* Code improvements.
* Fixed bug with unicode arguments in punishment commands.
* Added command `sm_comms` for players, which provides viewing communications status of himself.
* Bots are now removed from menu targets list.
* **0.8.1**
* Fixed bug with *player's name in the database sometimes was a part of another "sql-query"*
* Code improvements to avoid similar bugs in the future.
* Disabled sql-queries log.
* **0.7.122**
* Fixed bug: punishments were recorded into the database twice.
* Removed "select from queue" query from logging.
* Fixed bug with wrong logging comms actions in SM logs.
* Enabled sql-queries log.
* **0.7.114**
* Fixed some flaws in the sql queries.
* Small code improvements.
* **0.7.111** - First release on AlliedMods.
* **0.7.97**
* Minor bugs fixed.
* DEBUG info now disabled by default.
* Now plugin is "beta".
* **0.7.60**
* Changed internal data structure.
* Added to Menu List of Current players punishments (from original ExtendedComms plugin).
* Added "ConsoleImmunity" and "DisableUnblockImmunityCheck" variables to config.
* **0.6.52**
* Now plugin will auto-reloads after update.
* Little changes in translation.
* **0.6.51** - Added temporary punishments.
* **0.6.44** - Added "DefaultTime" variable to config.
* **0.6.42** - In debug mode, text of all sql queries will stored in separate log.
* **0.6.37** - Added console commands that provides unblocking player comms via web.
* **0.6.34** - Added Updater support.
* **0.6.20** - Fixed bug: "after restoring a database connection expired punishments were not added to main database".
* **0.6.19** - Fixed bug with displaying admin activity after restoring a database connection, but not immediately.
* **0.6.14** - Added console commands that provides blocking player comms via web.
* **0.5.30** - First public alpha.
Last edited by ppalex; 11-22-2014 at 12:10.
Reason: upd 0.9.265
|
|
|
|