AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   Player Warnings v1.1.3 (Updated: 6/23/12) (https://forums.alliedmods.net/showthread.php?t=164861)

thetwistedpanda 08-16-2011 12:47

Player Warnings v1.1.3 (Updated: 6/23/12)
 
3 Attachment(s)
Description:
  • Provides the ability for your administrators to warn players who are violating server rules, and place the ones that are simply not listening in timeout for a specifiable period of time.
Features:
  • The warning command, sm_warn, and the timeout command, sm_timeout, can be configured to play a specific sound upon issue, force the client to execute a specific command, execute a specific server command on the client, and/or display a motd panel upon the client.
  • For example, you can force the client to "say !rules" or display your rules web page, or sm_slay {clientUser}, or both.
  • Database (sqlite/mysql) and ClientPrefs support for tracking the total number of warnings and timeouts a player has been issued, as well as for saving current timeout information for multiple server support, in addition to logging past punishments.
  • Provides an in-game list command, sm_warnlist, which allows you to view current warning/timeout values as well as any current timeouts.
  • Provides a forgive command, sm_forgive, if punishments are accidental or you feel bad for picking on an annoying child.
ConVars:
  • sm_warnings_database: Controls what database configuration to use for warnings. Use "" for ClientPrefs.
  • sm_warnings_database_table: Controls what table the database will utilize if non-clientprefs.
  • sm_warnings_logging_database: Controls what database configuration to use for logging warnings. Use "" for Log files.
  • sm_warnings_logging_database_table: Controls what table the database will utilize if non log files.
  • sm_warnings_logging_database_path: Controls what table log file the plugin will use for logging if non-database.
  • sm_warnings_warn_cmd: The client command to be issued on the client upon being warned by an administrator.
  • sm_warnings_warn_url: The address to be issued to the client in a motd window upon being warned by an administrator.
  • sm_warnings_warn_sound: The sound to be played to the client upon being warned by an administrator.
  • sm_warnings_warn_duration: The number of seconds the center print will appear for a warned player. (0.0 = Disable Repeating Prints)
  • sm_warnings_timeout_cmd: The client command to be issued on the client upon being placed in time out.
  • sm_warnings_timeout_url: The address to be issued to the client in a motd window upon being placed in time out by an administrator.
  • sm_warnings_timeout_sound: The sound to be played to the client upon being placed in time out by an administrator.
  • sm_warnings_timeout_duration: The number of seconds the center print will appear for a player placed in timeout. (0.0 = Disable Repeating Prints)
  • sm_warnings_timeout_notify: If enabled, clients in timeout will receive a continuous center notification displaying the remaining time. (0 = Disabled, 1 = Enabled)
  • sm_warnings_expire_duration: The number of seconds the center print will appear for a player whos timeout has expired. (0.0 = Disable Repeating Prints)
  • sm_warnings_notify_warnings: The minimum number of warnings needed to warn in-game administrators of connection. (0 = Disabled)
  • sm_warnings_notify_timeouts: The minimum number of timeouts needed to warn in-game administrators of connection. (0 = Disabled)
  • sm_warnings_notify_admins: Players with this flag currently in-game will be notified of a player connecting that meet warning criteria, if they do not have the defined override.
  • sm_warnings_notify_admins_override: Players with this override currently in-game will be notified of a player connecting that meet warning criteria. ("" = Disabled)
Installation:
Spoiler
- Database: SQLite
Spoiler
- Database: MySQL
Spoiler

island55 08-16-2011 12:55

Re: [ANY] Player Warnings
 
very nice.

TnTSCS 08-16-2011 14:21

Re: [ANY] Player Warnings
 
this will come in handy... It will be perfect for when someone asks "why blah blah" and I can point them and force them to look at and read the MOTD which explains 99% of all questions :)

sinblaster 08-16-2011 18:47

Re: [ANY] Player Warnings
 
AWESOME EFFORT

thetwistedpanda 08-17-2011 13:47

Re: [ANY] Player Warnings
 
Version 1.0.2 released; minor bug fix.

ecca 08-17-2011 20:07

Re: [ANY] Player Warnings
 
Very nice Twistedpanda

micazoid 11-12-2011 09:28

Re: [ANY] Player Warnings
 
Plugin doesnt work :(

Quote:

15:27:59 [SM] Plugin encountered error 4: Invalid parameter or parameter type
15:27:59 [SM] Native "Format" reported: Language phrase "Prefix_Chat" not found
15:27:59 [SM] Displaying call stack trace for plugin "sm_player_warnings.smx":
15:27:59 [SM] [0] Line 190, sm_player_warnings.sp::OnConfigsExecuted()
Didn't compile it by myself (laaaazy XD )

I used the compiled version

EDIT:
Selcompiled version works. Nice Plugin Panda

thetwistedpanda 12-08-2011 09:57

Re: Player Warnings v1.0.4 (Updated: 12/8/11)
 
Revision 1.0.4 Released
  • Plugin now hides all SM activity messages when silencing/unsilencing players due to Timeout.
  • Fixed a bug where late loading didn't grab a player's steamid, preventing the plugin from working until map change / reconnect.
  • Expanded the general functionality of Player Warnings: Now with SQLite/MySQL Support
    • Tracks a player's number of warnings and timeouts.
    • Timeouts are stored in the database, rather than temporary Trie, so punishments do not end early.
    • Reverts to the temporary Trie if the database isn't configured or invalid.
    • Due to database support, now functions across multiple servers.
    • If sm_warnings_database isn't defined, defaults to "storage-local", a local sqlite database.
  • Added sm_warnlist, an admin command that displays information stored by the database.
    • Displays a player's total number of warnings and timeouts, as well as information pertaining to their current timeout, if applicable.
  • The cvar sm_warnings_timeout_duration is now sm_warnings_timeout_notify and has modified functionality.
  • The timeout notification now keeps track of the decreasing time, letting the punished player know just how long he/she has left.
  • Portions of the code have been rewritten/reworked to improve performance and functionality.
  • Translations have been rewritten to be a tad more descriptive.

xomp 12-08-2011 17:19

Re: Player Warnings v1.0.4 (Updated: 12/8/11)
 
Awesome work dude!

micazoid 12-09-2011 03:53

Re: Player Warnings v1.0.4 (Updated: 12/8/11)
 
Is the SQL Database now needed for any sake, or can I run it still without? I choose this plugin over others, because I haven't to put up a Database. I am not that kind of database guy XD

thetwistedpanda 12-09-2011 11:53

Re: Player Warnings v1.0.4 (Updated: 12/8/11)
 
It should still function without a database configured, however, it's going to produce errors if you attempt to run it without one. It's MySQL or SQLite, and as SourceMod has local SQLite support, there's no reason for you not to use one. Just leave sm_warnings_database at "" and it'll default to "sourcemod-local", unless you've botched your databases.cfg.

thetwistedpanda 12-09-2011 20:49

Re: Player Warnings v1.0.5 (Updated: 12/9/11)
 
Revision 1.0.5 Released
  • Fixed an embarrassing bug where any timeout issued would be placed on the administrator rather than the targeted player.
  • Added the command sm_warnreset, which will allow administrators with the root flag to clear a client's total warnings and timeouts.
  • Added support for notifying all in-game administrators of a troublesome player connecting to the server.
    • sm_warnings_notify_admins: optional flag that's used to determine which clients to send the connection notice to.
    • sm_warnings_notify_warnings: the number of warnings to notify on.
    • sm_warnings_notify_timeouts: the number of timeouts to notify on.
  • The functionality of sm_warnlist has been improved / modified.
    • If there are at least two players in the server, and one of those players is currently in timeout, the command now categorizes the players. Now gives the option to view only punished players, or view all players.
      • "List_Display_Current" (View currently punished players).
      • "List_Display_Total" (Lists data pertaining to player warnings).
    • The list all feature now modifies the client's name to display the current number of warnings/timeouts the client has. (This can be edited out via the translation)
    • Example: "Twisted|Panda, (W: 3, T: 0)"
  • Various translation changes, better to just re-translate anything if you've done such.
Revision 1.0.6 Released
  • Fixed an error with invalid client id, what's with all these errors :o.
  • Fixed a bug where a client's steamid wasn't loaded on connect.
  • Fixed a bug where client data was always reset on disconnect due to premature variable clearing.
Had to rush these updates due to various crippling bugs that managed to make it into the releases...

asherkin 12-31-2011 13:25

Re: Player Warnings v1.0.6 (Updated: 12/10/11)
 
Very nice plugin, just one minor issue, you should use the basecomm natives (http://docs.sourcemod.net/api/index....oad=file&id=59) rather than ServerCommand-ing it's commands and changing the sm_show_activity value.

thetwistedpanda 12-31-2011 15:41

Re: Player Warnings v1.0.6 (Updated: 12/10/11)
 
I intentionally ServerCommand to provide compatibility with my ExtendedComm plugin. Simply using the natives, I can't detect if a player has been muted by an external source, such as this plugin, unless I loop for changes every x seconds. That being said, I'll have to update to 1.0.7 sometime soon as I found a few nagging bugs.

thetwistedpanda 02-27-2012 10:57

Re: Player Warnings v1.0.8 (Updated: 2/27/11)
 
1.0.7 never made it out of my servers, so I don't have a changelog as to what was modified. Here's 1.0.8, however, which should wrap the plugin's development up. Short of SourceMod's basecomm supporting a few forwards notifying of a gag/mute, I have to use the sm_show_activity work around to provide compatability with other plugins (i.e. ExtendedComm).

Revision 1.0.8
  • Fixed a logic error involving the wrong function prototype possibly resulting in incorrect data.
  • Added support for ClientPrefs, and removed default "storage-local" functionality.
    • Using sm_warnings_database "" will result in ClientPrefs, otherwise it's the specified database.
  • Added additional redundancy code to ensure plugin compatibility; player_spawn is now checked, players are slayed prior to team changes, and any swap triggers a confirmation.
  • Added even more redundancy code to make sure players are punished after their data has been loaded.
  • Fixed a small bug where player_team was triggering a supression/comfirmation regardless of team.
  • Removed translation "Command_Database_Invalid", plugin now assumes database is valid.
  • An internal player counter now updates properly in late load scenarioes.
  • Several default translation changes.
  • sm_warnlist, view current timeouts, feature now works properly displaying player information on selection.

micazoid 02-28-2012 12:30

Re: Player Warnings v1.0.8 (Updated: 2/27/11)
 
First of all:
I updated to your newest version and it works very fine! I like the option to not use a databse! Thank you very much for this.

But now my critics:
Please tell the user, that this plugin will generate its own config. This is one line in installation, but helps a lot, because the commands will not be overwritten ^^

Second critics isnt really a critic.
I got this in the config:
sm_warnings_warn_cmd "sm_beacon"

But beacon will not appear, only:
[SM] Usage: sm_beacon <#userid|name>

Now my question: Can I aim at the warned via this and if yes: How?

Keep up the good work Panda

daleGEND 03-01-2012 14:30

Re: Player Warnings v1.0.8 (Updated: 2/27/11)
 
Hey panda,

When you warn someone can you put a reason, like !warn {name} {reason}

thetwistedpanda 03-01-2012 14:50

Re: Player Warnings v1.0.8 (Updated: 2/27/11)
 
That is something I've already begun development for in v1.1.0. Specifically, you'll be able to !warn <target> <reason> and !timeout <target> <length> <reason>, with the reason parameter being optional. It uses an extra database table so it can log numerous warnings per steamid, which can be then recalled via !warnlist. It'll save a timestamp / steamid / string, so that the reasons can be expired automatically after say, a month of being in the database.

daleGEND 03-01-2012 14:51

Re: Player Warnings v1.0.8 (Updated: 2/27/11)
 
Quote:

Originally Posted by thetwistedpanda (Post 1660565)
That is something I've already begun development for in v1.1.0. Specifically, you'll be able to !warn <target> <reason> and !timeout <target> <length> <reason>, with the reason parameter being optional. It uses an extra database table so it can log numerous warnings per steamid, which can be then recalled via !warnlist. It'll save a timestamp / steamid / string, so that the reasons can be expired automatically after say, a month of being in the database.

Sounds great, thanks!

micazoid 03-02-2012 08:40

Re: Player Warnings v1.0.8 (Updated: 2/27/11)
 
http://forums.alliedmods.net/showpos...5&postcount=16

thetwistedpanda 03-02-2012 08:56

Re: Player Warnings v1.0.8 (Updated: 2/27/11)
 
micazoid, the scirpt isn't mean to issue sm commands.

smithy 04-20-2012 06:50

Re: Player Warnings v1.0.8 (Updated: 2/27/11)
 
Quote:

Originally Posted by thetwistedpanda (Post 1660565)
That is something I've already begun development for in v1.1.0. Specifically, you'll be able to !warn <target> <reason> and !timeout <target> <length> <reason>, with the reason parameter being optional. It uses an extra database table so it can log numerous warnings per steamid, which can be then recalled via !warnlist. It'll save a timestamp / steamid / string, so that the reasons can be expired automatically after say, a month of being in the database.

I dont suppose you have got round to adding these features yet ?

Also could you add another database table with the users name , if its not to much trouble

Best regards

daleGEND 06-25-2012 06:44

Re: Player Warnings v1.0.8 (Updated: 2/27/11)
 
Quote:

Originally Posted by smithy (Post 1692844)
I dont suppose you have got round to adding these features yet ?

Also could you add another database table with the users name , if its not to much trouble

Best regards

Wanted to check in and see if this was going to be updated as well :)

micazoid 07-03-2012 14:31

Re: Player Warnings v1.0.8 (Updated: 2/27/11)
 
Got this error in my logs:

L 07/03/2012 - 18:45:16: [SM] Native "SQL_TQuery" reported: Invalid database Handle 0 (error: 4)
L 07/03/2012 - 18:45:16: [SM] Displaying call stack trace for plugin "sm_player_warnings.smx":
L 07/03/2012 - 18:45:16: [SM] [0] Line 200, sm_player_warnings.sp::OnClientPostAdminCheck ()

GunSpeed 08-02-2012 18:19

Re: Player Warnings v1.0.8 (Updated: 2/27/11)
 
In console when I type this : sm_warnlist
Unknown command: sm_warnlist

But the command works fine, shows me a list, figured I would share my findings.

PS: Is there a config file to edit and setup everything? I couldn't find any generated file, specially when I got 7 servers to manage!

I'll be waiting for 1.1.+ :)

daleGEND 11-14-2012 09:19

Re: Player Warnings v1.0.8 (Updated: 2/27/11)
 
Hey Panda, are you still planning to update this project or is it basically done at this point?

NinjaSK 01-15-2013 17:22

Re: Player Warnings v1.0.8 (Updated: 2/27/11)
 
This is definitely one of the best and useful mods I have ever seen
for server management.

1 bug:
Quote:

[SM] Unable to find sm_warnings_timeout_duration.
Thank you very much for this mr panda.

shavit 01-16-2013 03:52

Re: Player Warnings v1.0.8 (Updated: 2/27/11)
 
Quote:

Originally Posted by NinjaSK (Post 1874049)
This is definitely one of the best and useful mods I have ever seen
for server management.

1 bug:

Thank you very much for this mr panda.

When does this error trigger? I'll make you a hotfix till Panda will make one.

NinjaSK 01-16-2013 13:26

Re: Player Warnings v1.0.8 (Updated: 2/27/11)
 
Quote:

Originally Posted by shavit (Post 1874284)
When does this error trigger? I'll make you a hotfix till Panda will make one.

I just took the cVars from this post for testing, I noticed that the cVar
in the config is different than the cVar in his post so I was just teasing him...

Thanks for the offer though shavit :)

NinjaSK 02-05-2013 15:20

Re: Player Warnings v1.0.8 (Updated: 2/27/11)
 
panda, when I timeout someone and he retry's he is still gagged.

Fearts 03-05-2013 18:57

Re: Player Warnings v1.0.8 (Updated: 2/27/11)
 
Would be cool if you could add a reason to why you are warning someone.

sm_warn <player> "reason"

thetwistedpanda 04-07-2013 13:01

Re: Player Warnings v1.0.8 (Updated: 2/27/11)
 
Quote:

Originally Posted by NinjaSK (Post 1887744)
panda, when I timeout someone and he retry's he is still gagged.

Don't remember code, but timeout wouldn't expire on retry. Otherwise what would be the point. If time allows I'll look at code, but it won't be today.

thetwistedpanda 04-14-2013 17:09

Re: Player Warnings v1.1.0 (Updated: 4/14/12)
 
Revision 1.0.9
----------------
  • Fixed an error where a client's loaded state was not reset, so ClientPref punishments were never re-loaded.
  • Fixed a case where late-loading was not properly initiated, resulting in punishments being assigned to other players.
Revision 1.1.0
--------------
  • CVar Changes:
    • sm_warnings_warn_cmd renamed to sm_warnings_warn_client_cmd
    • sm_warnings_timeout_cmd renamed to sm_warnings_timeout_client_cmd
    • sm_warnings_notify_admins renamed to sm_warnings_notify_admin_flag
  • CVar Additions:
    • sm_warnings_warn_server_cmd - Allows execution of a server command on targeted client. Support for userid, name, and authid.
    • sm_warnings_time_server_cmd - Allows execution of a server command on targeted client. Support for userid, name, and authid.
      • Example: sm_beacon {clientUser}, sm_say {clientName} is a bad boy, sm_say2 Yo, add {clientAuth} to the ban list.
    • sm_warnings_notify_admins_override - Desired override to check clients against for notification of naughty players.
      • Plugin is hardcoded to ignore anyone connecting with override "Player_Warnings_Ignore" // AdmFlag_Generic.
      • Override "Player_Warnings_Ignore" to "z" if you want to disable that functionality...
    • sm_warnings_database_table - Allows modification of the table the plugin creates and uses as opposed to hardcoded player_warnings.
    • sm_warnings_logging_database - Database connection to use for logging, "" defaults to local log files.
    • sm_warnings_logging_database_table - Allows modification of the table the plugin creates and uses for logging.
  • Modifications:
    • Plugin now utilizes morecolors.inc instead of colors.inc. CS:GO users will want to recompile with the colors.inc designed for CS:GO.
    • Existing Auth system replaced with proper CheckCommandAccess for overrides support.
    • Fixed a bug where sm_warnings_notify_admin (pre-rename) never updated mid-game if changed.
    • Replaced hardcoded usage of "Prefix_Chat" and "Prefix_Center" with per-client translations.
    • Added basic logging support to both log files and external database.
      • File logging logs to /sourcemod/logs/player_warnings.log and lists the name/steam of both admin/target as well as timestamp and reason.
      • Database logging logs targeted steam, warning vs timeout, timestamp, reason, and the steamid of the issuing admin.
      • The sm_warnlist command can be used to recall any past punishment (since this release) if database logging is enabled.
    • Added basic support for attaching a reason to both sm_warn and sm_timeout
      • Players who have been targeted will now receive an additional message with the specified reason.
      • sm_warn <target> <optional:reason>
      • sm_timeout <target> <optional:time> <optional:reason>
    • The following translations were added:
      • Notify_Warn_Chat_Reason, Notify_Timeout_Chat_Reason, Menu_Past_Title_List, List_Past_Punishments, Phrase_List_Past_Punishments_Null
      • Menu_Past_Option_Warn, Phrase_List_Past_Warning, Menu_Past_Option_Time, Phrase_List_Past_Time, Phrase_Default_Reason
Revision 1.1.1
----------------
  • SQL queries are now executed when command is issued, rather than caching until the client disconnects.
  • The sm_warnreset command now removes all previous punishments from the logging database.
  • Removed random requirement for adminmenu when it wasn't being used.
  • Added CVar sm_warnings_time_format to control the time format used in sm_warnlist

NinjaSK 04-17-2013 16:45

Re: Player Warnings v1.1.1 (Updated: 4/14/12)
 
Super! thanks!

thetwistedpanda 06-23-2013 04:35

Re: Player Warnings v1.1.3 (Updated: 6/23/12)
 
Revision 1.1.2
  • Plugin now takes into consideration SQLite v MySQL in regards to Auto Increment.
Revision 1.1.3
  • Fixed a bug where sm_warn issued the client command for server command.
  • Fixed a serious bug with the auth portion of the database causing errors galore.
  • Added sm_warnpuge, to completely dump tables.

DigidyDOG 11-17-2019 03:42

Re: Player Warnings v1.1.3 (Updated: 6/23/12)
 
Hey I updated this plugin to the new newdecls and deprecated functions.

Let me know if you want the code I have updated or if there is github repo I can make a pull request.

P.S. I am not the best coder. The plugin compiles and appears to be working further testing is needed.

also sorry if I am grave digging a thread. I just need a plugin like this one and it was inciting to update it.


All times are GMT -4. The time now is 10:08.

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