AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [ANY] MuteCheck (https://forums.alliedmods.net/showthread.php?t=165329)

Dr. McKay 08-21-2011 22:59

[ANY] MuteCheck
 
[ANY] MuteCheck

v1.9.2

Description:
This simply shows who has muted a specific player via the game's mute button. This has only been tested in TF2, but it should work in any Source game. By default anyone is allowed to type sm_mutecheck and it'll display who has muted you. Admins with the flag ADMFLAG_GENERIC can also type sm_mutecheck [target] to check who's muted the specific target. The admin flag can be overridden with the override below.

Commands:
sm_mutecheck - responds with who has muted you
sm_mutecheck [target] - responds with who has muted the target

Cvars:
sm_mutecheck_tag "[SM]" - allows you to change the tag prepended to Mutecheck responses
sm_mutecheck_version - plugin version
sm_mutecheck_auto_update "1" - enables automatic updating (has no effect if Updater is not installed)

Installation:
Put mutecheck.smx into /addons/sourcemod/plugins and reboot your server or type "sm plugins load mutecheck" into your console or rcon.

Overrides:
sm_mutecheck_override - Add this to your overrides to change the flag required to check the mutes for a specific target

Auto Update:
Install Updater. The plugin will be autoupdated according to your Updater settings. It'll work without Updater.

Changelog:
  • v1.9.0 (7/12/12)
    • Added ability to disable automatic updating (sm_mutecheck_auto_update)
  • v1.8.0 (7/9/12)
    • Added support for group targeting
    • Optimized message output
  • v1.7.0 (10/24/11)
    • Fixed an issue where the plugin would not be added to the Updater pool
  • v1.6.0 (10/23/11)
    • The plugin now uses the newer, better-supported Updater plugin
    • Added sm_mutecheck_tag cvar
    • Typing sm_mutecheck without any parameters in the console now returns a usage message
  • v1.5 (10/23/11)
    • The version cvar now has an "A" appended to it if autoupdate is functioning
  • v1.4 (9/5/11)
    • Removed immunity check from sm_mutecheck [target].
  • v1.3 (8/26/11)
    • Fixed sm_mutecheck [target] not working
  • v1.2 (8/23/11)
    • Updated plugin with optimized code, and allowed plugin to compile without autoupdate installed.
  • v1.1 (8/22/11)
    • Added autoupdate
  • v1.0 (8/21/11)
    • Initial Release

Download Plugin (mutecheck.smx)
View Source (mutecheck.sp)

TnTSCS 08-22-2011 00:08

Re: [ANY] MuteCheck
 
this could be useful :)

RedSword 08-22-2011 00:58

Re: [ANY] MuteCheck
 
An option to know all players / a team if they muted you could be nice too (i.e. you display only those who muted you).

Dr. McKay 08-22-2011 01:07

Re: [ANY] MuteCheck
 
Quote:

Originally Posted by RedSword (Post 1538136)
An option to know all players / a team if they muted you could be nice too (i.e. you display only those who muted you).

I'm sorry, I don't fully understand what you were saying. Could you rephrase it please? :)

RedSword 08-22-2011 02:03

Re: [ANY] MuteCheck
 
Sorry kind-of tired.

You could add the following options :
  • A command that allows to know which players muted the admin.
  • A command that allows to know which players of a team muted the admin.

i.e. :

sm_mutecheckteam t --> "Bob, Jack and Dick muted you."

Dr. McKay 08-22-2011 02:13

Re: [ANY] MuteCheck
 
Quote:

Originally Posted by RedSword (Post 1538170)
Sorry kind-of tired.

You could add the following options :
  • A command that allows to know which players muted the admin.
  • A command that allows to know which players of a team muted the admin.

i.e. :

sm_mutecheckteam t --> "Bob, Jack and Dick muted you."

Well, the plugin already shows which players muted you. sm_mutecheck returns a list of all players who muted you (and sm_mutecheck [target] returns a list of all players who muted [target]). Are you saying something like sm_mutecheckteam red to return a list of all RED players who muted you?

RedSword 08-22-2011 02:30

Re: [ANY] MuteCheck
 
wtf I read too quickly... nevermind me...

Dr. McKay 08-22-2011 02:37

Re: [ANY] MuteCheck
 
Quote:

Originally Posted by RedSword (Post 1538182)
wtf I read too quickly... nevermind me...

Lol, it's okay. Happens to me all the time. :P

Dr. McKay 08-22-2011 13:23

Re: [ANY] MuteCheck
 
Plugin updated to version 1.1, added auto update!

Peace-Maker 08-23-2011 13:30

Re: [ANY] MuteCheck
 
Nice idea. Some notes:
The boolean tag is lowercase in sourcepawn. "bool:" instead of "Bool:".
When using #tryinclude, make sure to mark the autoupdate natives as optional in askpluginload2 to have the plugin compile if the include fails.

PHP Code:

if(StrEqual(buffer"@all") || StrEqual(buffer"@red") || StrEqual(buffer"@blue") || StrEqual(buffer"@alive") || StrEqual(buffer"@dead") || StrEqual(buffer"@humans") || StrEqual(buffer"@bots") || StrEqual(buffer"@ct") || StrEqual(buffer"@t")) {
    
ReplyToCommand(client"[SM] Usage: sm_mutecheck [target]");
    return 
Plugin_Handled;


You don't want those group targeting features?
Consider using FindTarget to allow a single target only.

For performance reasons, don't declare new variables in a loop, but do it beforehand.

Dr. McKay 08-23-2011 17:44

Re: [ANY] MuteCheck
 
Quote:

Originally Posted by Peace-Maker (Post 1539375)
Nice idea. Some notes:
The boolean tag is lowercase in sourcepawn. "bool:" instead of "Bool:".
When using #tryinclude, make sure to mark the autoupdate natives as optional in askpluginload2 to have the plugin compile if the include fails.

PHP Code:

if(StrEqual(buffer"@all") || StrEqual(buffer"@red") || StrEqual(buffer"@blue") || StrEqual(buffer"@alive") || StrEqual(buffer"@dead") || StrEqual(buffer"@humans") || StrEqual(buffer"@bots") || StrEqual(buffer"@ct") || StrEqual(buffer"@t")) {
    
ReplyToCommand(client"[SM] Usage: sm_mutecheck [target]");
    return 
Plugin_Handled;


You don't want those group targeting features?
Consider using FindTarget to allow a single target only.

For performance reasons, don't declare new variables in a loop, but do it beforehand.

Thanks for the help! As you can probably tell, I'm just learning SourcePawn. :)

I've updated it with the stuff you said.

Dr. McKay 08-26-2011 19:07

Re: [ANY] MuteCheck
 
Updated to v1.3 to fix sm_mutecheck [target] not working. My bad, I mixed up the muter and mutee in IsClientMuted().

Dr. McKay 09-05-2011 16:19

Re: [ANY] MuteCheck
 
Plugin has been updated to v1.4. Removed immunity check from sm_mutecheck [target].

snelvuur 09-07-2011 09:48

Re: [ANY] MuteCheck
 
if there are xx players on the servers and xx players have muted 1 particular person then mute the person for the other players too.. might be a idea.. (but maybe too much for now)

Dr. McKay 09-07-2011 12:24

Re: [ANY] MuteCheck
 
Quote:

Originally Posted by snelvuur (Post 1549986)
if there are xx players on the servers and xx players have muted 1 particular person then mute the person for the other players too.. might be a idea.. (but maybe too much for now)

That's another plugin in and of itself, but it could be done relatively easily. Just a question though, why exactly do you want that? The few that haven't muted said player might want to hear what he or she is saying. The ones that have muted aren't going to hear them either way.

snelvuur 09-07-2011 15:07

Re: [ANY] MuteCheck
 
Well if somebody is spamming the mic, if you suddenly have 5 people muting a person that usually is a dead giveaway that he is spamming. But like you said it would be another plugin then, but hey it was just a suggestion :)

Dr. McKay 10-23-2011 14:26

Re: [ANY] MuteCheck
 
Updated. The version cvar now has an "A" appended to it if autoupdate is functioning.

Dr. McKay 10-23-2011 18:51

Re: [ANY] MuteCheck
 
Updated. Now uses the newer, better supported Updater, added sm_mutecheck_tag to change the tag prepended to Mutecheck responses, and typing sm_mutecheck in the console without any parameters now return a usage message.

Dr. McKay 10-25-2011 00:05

Re: [ANY] MuteCheck
 
Updated to 1.7.0. Fixed an issue where the plugin wouldn't be added to the Updater pool. If you are running Updater and you want to automatically update, simply execute "sm plugins reload mutecheck" followed by "sm_mutecheck_forceupdate" in the console/rcon.

Atreus 04-25-2012 03:09

Re: [ANY] MuteCheck
 
Firstly, is there any particular reason for disallowing the group targetting (eg @all, etc)? It could be really useful to see, at a glance, who is muted by who. If you just feel it's too much work, this plugin by necavi makes the process REALLY simple.

Secondly, any chance you could add an option for what flag someone needs to use sm_mutecheck itself? I don't want non-admins to have access, because seeing other people have muted them may cause unneeded drama. But it's a great admin tool

edit: i managed to edit and recompile the plugin to fix the second issue I brought up. Would love to see that and/or the targetting thing in the official copy as well so I could let it autoupdate.

Dr. McKay 04-25-2012 07:11

Re: [ANY] MuteCheck
 
Quote:

Originally Posted by Atreus (Post 1696039)
Firstly, is there any particular reason for disallowing the group targetting (eg @all, etc)? It could be really useful to see, at a glance, who is muted by who. If you just feel it's too much work, this plugin by necavi makes the process REALLY simple.

Secondly, any chance you could add an option for what flag someone needs to use sm_mutecheck itself? I don't want non-admins to have access, because seeing other people have muted them may cause unneeded drama. But it's a great admin tool

edit: i managed to edit and recompile the plugin to fix the second issue I brought up. Would love to see that and/or the targetting thing in the official copy as well so I could let it autoupdate.

There's no need to edit and recompile a plugin to change the flag required to use a command. Just override it in configs/admin_overrides.cfg.

I can edit it and add group targeting when I get home. The way it's written, it'd spam the chat, but I can make group targeting commands print to the console, similar to sm_who.

Atreus 04-25-2012 07:14

Re: [ANY] MuteCheck
 
Quote:

Originally Posted by Dr. McKay (Post 1696092)
There's no need to edit and recompile a plugin to change the flag required to use a command. Just override it in configs/admin_overrides.cfg.

That's the first thing I did, actually; however, for whatever reason, non-admins were still able to use the command. I've got a few other commands like that in the overrides file, and it worked fine on those. The only other example I can think of where it didn't work was the "Who's Free" plugin that lists everyone's Premium/F2P status. Maybe it's got something to do with argless commands?
Quote:

Originally Posted by Dr. McKay (Post 1696092)
I can edit it and add group targeting when I get home. The way it's written, it'd spam the chat, but I can make group targeting commands print to the console, similar to sm_who.

Sounds great!

Dr. McKay 04-25-2012 07:19

Re: [ANY] MuteCheck
 
Ohh. I seem to recall reading that overriding console commands (RegConsoleCmd) doesn't work. I'll turn it into a public admin command.

Atreus 04-25-2012 08:15

Re: [ANY] MuteCheck
 
Ah, neat! Glad to know I wasn't being a dumbhead :v

Regarding that list-all feature, any chance you'd add a way to list only those who've been muted by at least X people? It'd make the list smaller, more manageable, and far more useful "at a glance". These are the two methods I thought of, for what it's worth:
  1. Basic approach: add one new command which lists anyone with 1 or more mutes (those without are pretty pointless in this case).

  2. Fancy and flexible approach: add a new cvar (sm_mutelist_threshhold? sm_listmutes_min?) would allow admins to specify a default other than 1. A new command (sm_mutelist? sm_listmutes? sm_mutecheck_list?), or tweak to the original one, for the actual listing, allowing an int argument to override the default set by the aforementioned cvar.

Thanks for being so quick to respond and for taking my requests/ideas into account!

Dr. McKay 05-08-2012 22:37

Re: [ANY] MuteCheck
 
Sorry this took so long, I completely forgot about it. :oops:

Version 1.7.2 is going live in just a moment. Only change is sm_mutecheck can now be overridden.

Group targeting is coming soon.

Atreus 05-11-2012 03:16

Re: [ANY] MuteCheck
 
Quote:

Originally Posted by Dr. McKay (Post 1705301)
Sorry this took so long, I completely forgot about it. :oops:

Version 1.7.2 is going live in just a moment. Only change is sm_mutecheck can now be overridden.

Group targeting is coming soon.

That's great to hear, thanks! :)

Atreus 05-27-2012 06:57

Re: [ANY] MuteCheck
 
Any updates on this, by any chance?

Atreus 07-09-2012 01:21

Re: [ANY] MuteCheck
 
One last bump? D:

Dr. McKay 07-09-2012 09:40

Re: [ANY] MuteCheck
 
This has been pretty low on my list of things to do, since I have real life stuff and paid work and such. I'll see what I can get done later today, though.

Dr. McKay 07-09-2012 15:38

Re: [ANY] MuteCheck
 
Plugin updated to v1.8.0. Changelog:
  • Added support for group targeting
  • Optimized message output

Dr. McKay 07-12-2012 17:03

Re: [ANY] MuteCheck
 
Updated to v1.9.0. Added ability to disable automatic updating (sm_mutecheck_auto_update).

Atreus 07-24-2012 03:54

Re: [ANY] MuteCheck
 
Awesome, thanks a bunch! I didn't expect you to take time out of paid projects and the like, but I didn't want it to get forgotten about, either :v

Pythong 04-10-2013 10:50

Re: [ANY] MuteCheck
 
An idea/suggestion that would make this plugin awesome:)

Add the ability to set a threshold and if a player has X amount of mutes against him the server will auto-mute him.

I know it would mean more automated queries in the back end per user vs looking up a single user a will, but just a thought.

Dr. McKay 04-10-2013 10:57

[ANY] MuteCheck
 
Quote:

Originally Posted by Pythong (Post 1930073)
An idea/suggestion that would make this plugin awesome:)

Add the ability to set a threshold and if a player has X amount of mutes against him the server will auto-mute him.

I know it would mean more automated queries in the back end per user vs looking up a single user a will, but just a thought.

That would be better in a separate plugin.


All times are GMT -4. The time now is 00:03.

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