Forum
News CS2D v1.0.0.6Background is, I'm not really eager to use a "bloated" admin script. While they're probably fine, I don't wanna risk security issues (the more functions the more risks) and would also prefer some kind of minimalism.
Thanks a lot for your time.
This is possible and simple:
Use the say hook
Check if the text begins with "rcon"
If yes: Check if the player who said is has admin rights (via player you can get the USGN and Steam ID)
If yes: Run the part behind the "rcon" text as a CS2D script using parse & return 1 to prevent the normal chat output
Can be done with a few lines of Lua.
I recommend to use USGN ID for validation and to enable sv_checkusgnlogin (it's enabled by default anyway).
Note that with this solution you now have to enter your rcon commands in chat, not in console (since you can't access the server console directly). This bears another tiny risk e.g. when entering sensitive commands containing a password. You may accidentally expose these commands and settings when you mistype "rcon". Moreover your chat input is not encrypted unlike internal RCon commands.