Raised This Month: $12 Target: $400
 3% 

[ALL] Command & CVAR shortcut


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Arkarr
Veteran Member
Join Date: Sep 2012
Location: Just behind my PC screen
Plugin ID:
4011
Plugin Version:
1.0
Plugin Category:
Admin Commands
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Type some words into the chat and activate the specific command !
    Old 12-26-2013 , 09:11   [ALL] Command & CVAR shortcut
    Reply With Quote #1


    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

    CVar
    - any

    Configuration


    "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 View Post
    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.
    Attached Files
    File Type: cfg ChatCommand.cfg (205 Bytes, 1421 views)
    File Type: smx CommandShortcut.smx (3.8 KB, 870 views)
    File Type: sp Get Plugin or Get Source (CommandShortcut.sp - 2059 views - 1.5 KB)
    __________________

    Last edited by Arkarr; 02-18-2014 at 12:05.
    Arkarr is offline
    jpwanabe
    Veteran Member
    Join Date: Mar 2010
    Old 12-26-2013 , 11:48   Re: [ALL] Command shortcut
    Reply With Quote #2

    Yay! Works perfect.
    __________________
    My Steam TF2APP
    My sig changes with each load! Refresh to see my other servers!
    jpwanabe is offline
    dotexe
    Senior Member
    Join Date: Aug 2013
    Old 12-26-2013 , 20:16   Re: [ALL] Command shortcut
    Reply With Quote #3

    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.
    dotexe is offline
    Arkarr
    Veteran Member
    Join Date: Sep 2012
    Location: Just behind my PC screen
    Old 12-27-2013 , 02:19   Re: [ALL] Command shortcut
    Reply With Quote #4

    Quote:
    Originally Posted by dotexe View Post
    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'.
    __________________

    Last edited by Arkarr; 12-27-2013 at 02:21.
    Arkarr is offline
    Dr. McKay
    Sir Dr. SourceMod Plugin Approver Esq. Ltd. M.D. PhD
    Join Date: Aug 2011
    Location: Atlantis
    Old 12-27-2013 , 03:24   Re: [ALL] Command shortcut
    Reply With Quote #5

    PHP Code:
    GetClientName(clientplayer_namesizeof(player_name));
    ReplaceString(strCommandsizeof(strCommand), "[PLAYER_NAME]"player_name);
    ServerCommand(strCommand); 
    Quote:
    Originally Posted by DarthNinja View Post
    Show me a server running this plugin and I'll show you a server I can run arbitrary commands on.
    __________________

    Last edited by Dr. McKay; 12-27-2013 at 03:25.
    Dr. McKay is offline
    Arkarr
    Veteran Member
    Join Date: Sep 2012
    Location: Just behind my PC screen
    Old 12-27-2013 , 03:33   Re: [ALL] Command shortcut
    Reply With Quote #6

    Quote:
    Originally Posted by Dr. McKay View Post
    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.
    __________________
    Arkarr is offline
    ddhoward
    Veteran Member
    Join Date: May 2012
    Location: California
    Old 12-27-2013 , 04:11   Re: [ALL] Command shortcut
    Reply With Quote #7

    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
    __________________

    Last edited by ddhoward; 12-27-2013 at 04:56.
    ddhoward is offline
    Arkarr
    Veteran Member
    Join Date: Sep 2012
    Location: Just behind my PC screen
    Old 12-27-2013 , 04:48   Re: [ALL] Command shortcut
    Reply With Quote #8

    Okay, got it. Thanks! Updated.
    __________________

    Last edited by Arkarr; 12-27-2013 at 05:08.
    Arkarr is offline
    MafiaBoss
    AlliedModders Donor
    Join Date: Aug 2013
    Old 12-28-2013 , 00:59   Re: [ALL] Command shortcut
    Reply With Quote #9

    This isn't working for me, is anyone else experiencing it too?
    MafiaBoss is offline
    Arkarr
    Veteran Member
    Join Date: Sep 2012
    Location: Just behind my PC screen
    Old 12-28-2013 , 11:32   Re: [ALL] Command shortcut
    Reply With Quote #10

    Quote:
    Originally Posted by MafiaBoss View Post
    This isn't working for me, is anyone else experiencing it too?
    Hum, what's wrong ? Any error(s) in console and logs ?
    __________________
    Arkarr 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 01:32.


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