AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [ALL] Command & CVAR shortcut (https://forums.alliedmods.net/showthread.php?t=232149)

Arkarr 12-26-2013 09:11

[ALL] Command & CVAR shortcut
 
3 Attachment(s)

Command & CVAR shortcut
PLEASE UPDATE TO LAST VERSION !

-----------------------------------------
Please, update this plugin. I have created a high security fail in your server if you still run a OLD version of this plugin.
Again please, update this plugin, really sorry.
More infos in post #7

-----------------------------------------

Description :
A nother simple plugin usefull if you have to type a lot of commands or you always forget the name of one.
You can easily shortcut your command using a simple text file.
This plugin was requested by jpwanabe (original thread : here ).

Features :
- Support any text as shortcut
- You can restrict shortcut using flags
- Simple keyword.

Bugs :
Any for the moment ! YAY !

Commands & Cvar :
Commands :
- any, you should set them your self :3

CVar
- any

Configuration
http://image.noelshack.com/fichiers/...csshortcut.png

"chat" -> what should be the word(s) to activate the command ?
"command" -> What should be the command to execute ?
"flag" -> Flag needed to use the command. Leave blank to give acess to everyone.

Keyword :
[PLAYER_NAME] = same as @me. Please, only use [PLAYER_NAME] and NOT @me

Installation :
- Put CommandShortcut.smx in your 'plugins' folder (../sourcemode/plugins)
- Put ChatCommand.cfg in your 'configs' folder (../sourcemode/configs)
- Restart server or reload map.

Request :
STATUS: Under work
Quote:

Originally Posted by dotexe (Post 2076819)
Is there a way to make it work with group filters? Like "@reds" or "@me"? This could be useful for me because I want to use this plugin for donators.

Logs :
1.0 - first public release.
1.1 - Fixed a big security fail.
1.2 - Fixed a aim player bug (using %s instend of %d). Thanks to ddhoward who fixed this for me !
1.3 - Added a CVAR to allow if command/cvar should be executed when sentence contains the shortcut or the shortcut alone should do the command/cvar.

jpwanabe 12-26-2013 11:48

Re: [ALL] Command shortcut
 
Yay! Works perfect.

dotexe 12-26-2013 20:16

Re: [ALL] Command shortcut
 
Is there a way to make it work with group filters? Like "@reds" or "@me"? This could be useful for me because I want to use this plugin for donators.

Arkarr 12-27-2013 02:19

Re: [ALL] Command shortcut
 
Quote:

Originally Posted by dotexe (Post 2076819)
Is there a way to make it work with group filters? Like "@reds" or "@me"? This could be useful for me because I want to use this plugin for donators.

You didn't read all. You should use the keyword [PLAYER_NAME] to aim the user who typed the command. (same as @me)
Okay, gonna work on '@red'.

Dr. McKay 12-27-2013 03:24

Re: [ALL] Command shortcut
 
PHP Code:

GetClientName(clientplayer_namesizeof(player_name));
ReplaceString(strCommandsizeof(strCommand), "[PLAYER_NAME]"player_name);
ServerCommand(strCommand); 

Quote:

Originally Posted by DarthNinja (Post 1957957)
Show me a server running this plugin and I'll show you a server I can run arbitrary commands on.


Arkarr 12-27-2013 03:33

Re: [ALL] Command shortcut
 
Quote:

Originally Posted by Dr. McKay (Post 2076913)
PHP Code:

GetClientName(clientplayer_namesizeof(player_name));
ReplaceString(strCommandsizeof(strCommand), "[PLAYER_NAME]"player_name);
ServerCommand(strCommand); 


What's wrong ? I mean, this is the only way I found to execute command through chat.

ddhoward 12-27-2013 04:11

Re: [ALL] Command shortcut
 
Change your name on steam to:

Code:

derp ; quit
Then run a command that this plugin provides. The server will shut down. Or change your name to:

Code:

derp ; sm_kick @all
and all of a sudden, the Console kicks the entire server.

Use the client ID or even the Steam ID instead of the name. NEVER EVER EVER pass the client's name through ServerCommand()! This will allow the client to run any command from the Console as if they had (albeit very cumbersome) RCON access. And indeed, every server running this plugin is now open to this very serious exploit.

You need to replace GetClientName() with GetClientUserId(). Then put that number after the # symbol. The following are examples of commands using the User ID as a target.

Code:

sm_rof #124 3
sm_kick #534 "no mic spam allowed here sir"
sm_ban #321 0 "name changing hacker"
sm_beacon #48

etc etc etc

Arkarr 12-27-2013 04:48

Re: [ALL] Command shortcut
 
Okay, got it. Thanks! Updated.

MafiaBoss 12-28-2013 00:59

Re: [ALL] Command shortcut
 
This isn't working for me, is anyone else experiencing it too?

Arkarr 12-28-2013 11:32

Re: [ALL] Command shortcut
 
Quote:

Originally Posted by MafiaBoss (Post 2077333)
This isn't working for me, is anyone else experiencing it too?

Hum, what's wrong ? Any error(s) in console and logs ?


All times are GMT -4. The time now is 04:20.

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