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

Console Command Blocker


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Cooltad
Veteran Member
Join Date: Apr 2008
Plugin ID:
444
Plugin Version:
1.0.0
Plugin Category:
Server Management
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Allows users to customize what client-side console commands they do not want people to be able to use.
    Unapprover:
    Reason for Unapproving:
    Duplicate plugin
    Old 07-02-2008 , 18:36   Console Command Blocker
    Reply With Quote #1

    Console Command Blocker

    Author
    Cooltad, pRED*

    About
    I thought it would benefit many others if I took pRED*'s Benchmark Exploit Blocker and build upon it (with his permission, respectively). Since I am just starting out on scripting in SM my best way of learning is by example and experience.

    Installation
    You can use the smx if you wish but I wouldn't recommend it as different builds of SourceMod compile and use .smx files differently.
    I suggest you download the get source version (the .sp file) and place it in 'scripting'. Then, drag the file over the compile.exe and go into the compiled folder and copy paste it into the plugins folder.
    Directions on adding more commands to block are inside the source file.
    There are already 3 base blocks in place which are commands that can potentially crash your server.

    CVARs if it is italicized it does not need to be set by you.
    sm_con_com_block_version "1.0.0"

    Usage
    It can be very useful as not only can it block out commands that can potentially crash your server but other commands as well.
    Maybe you don't want people to be able to "suicide"? Then you would insert this example below the ones that are already there.
    (this example is one of two ways to suicide; the other way is by 'explode')
    Example:
    PHP Code:
        new flags3 GetCommandFlags("kill");        // prevents player from suiciding using 'kill command'
        
    SetCommandFlags("kill"flags3|FCVAR_CHEAT); 
    Remember to increment the number after 'flags' for each new command to block.

    I beleive in making plugins that people can customize and learn from. ^_^
    So I hope some of you find a use for this.
    Oh and I wouldn't wanna make it so typing in the illegal commands bans the player because a simple command is never worth a ban.
    Attached Files
    File Type: sp Get Plugin or Get Source (con_com_blocker.sp - 4195 views - 1.6 KB)
    __________________
    Please, give me some rep if you found what I posted useful. :]

    Last edited by Cooltad; 07-02-2008 at 19:48.
    Cooltad is offline
    SixSicSix
    Senior Member
    Join Date: Jan 2008
    Old 07-02-2008 , 19:55   Re: Console Command Blocker
    Reply With Quote #2

    Quote:
    Originally Posted by Cooltad View Post
    Oh and I wouldn't wanna make it so typing in the illegal commands bans the player because a simple command is never worth a ban.
    Tell that to all the eGO/DIG servers
    SixSicSix is offline
    fpsbrian
    Senior Member
    Join Date: Feb 2008
    Old 07-04-2008 , 09:33   Re: Console Command Blocker
    Reply With Quote #3

    Very good idea!!!

    Thanks
    __________________
    fpsbrian is offline
    -=CsFF=- Eagle
    SourceMod Donor
    Join Date: May 2005
    Old 07-04-2008 , 12:14   Re: Console Command Blocker
    Reply With Quote #4

    Hi,

    if i want to block the timeleft command because of spamming this here is right?


    new flags3 = GetCommandFlags("timeleft"); SetCommandFlags("timeleft", flags3|FCVAR_CHEAT);

    Thanks
    -=CsFF=- Eagle is offline
    DontWannaName
    Veteran Member
    Join Date: Jun 2007
    Location: VALVe Land, WA
    Old 07-04-2008 , 12:16   Re: Console Command Blocker
    Reply With Quote #5

    No, this isnt going to stop it since thats a chat command. Go in sourcemod.cfg and change it to show to the person only.
    __________________

    DontWannaName is offline
    Banjo Boy
    Member
    Join Date: Apr 2008
    Old 07-04-2008 , 20:06   Re: Console Command Blocker
    Reply With Quote #6

    I love this! Now people will stop killing themselves before dying to improve their kdr for PVKII! Thanks alot!

    Banjo.
    __________________
    Banjo Boy is offline
    Cooltad
    Veteran Member
    Join Date: Apr 2008
    Old 07-05-2008 , 13:38   Re: Console Command Blocker
    Reply With Quote #7

    I'm trying to work on a way to make it so you set illegal commands through your cfg.
    __________________
    Please, give me some rep if you found what I posted useful. :]
    Cooltad is offline
    wing_hk
    Member
    Join Date: Jun 2008
    Old 07-06-2008 , 13:08   Re: Console Command Blocker
    Reply With Quote #8

    Sometimes players in HL2 Coop server use "jointeam" command to team kill or get extra weapon. I try to block running jointeam command from console but failed.

    Code:
    new flags3 = GetCommandFlags("jointeam 2");                    // potential cheat use
        SetCommandFlags("jointeam", flags3|FCVAR_CHEAT);
    
        new flags4 = GetCommandFlags("jointeam 3");                    // potential cheat use
        SetCommandFlags("jointeam", flags4|FCVAR_CHEAT);
    
        new flags5 = GetCommandFlags("jointeam");                    // potential cheat use
        SetCommandFlags("jointeam", flags5|FCVAR_CHEAT);
    I tried Jointeam, Jointeam 2, Jointeam 3. However they can still be run in the game.

    Any idea?
    wing_hk is offline
    Cooltad
    Veteran Member
    Join Date: Apr 2008
    Old 07-06-2008 , 13:31   Re: Console Command Blocker
    Reply With Quote #9

    PHP Code:
        new flags3 GetCommandFlags("jointeam");        // potential cheat use
        
    SetCommandFlags("jointeam"flags3|FCVAR_CHEAT); 
    There is most likely something that goes after jointeam that makes it work.
    __________________
    Please, give me some rep if you found what I posted useful. :]
    Cooltad is offline
    fpsbrian
    Senior Member
    Join Date: Feb 2008
    Old 07-09-2008 , 12:46   Re: Console Command Blocker
    Reply With Quote #10

    Hey, I'm new to sourcemod and I dont know how to compile and what not, Here is what I'm trying to block


    Code:
        new flags = GetCommandFlags("sv_benchmark_force_start");        // crashes server
        SetCommandFlags("sv_benchmark_force_start", flags|FCVAR_CHEAT);
        
        new flags1 = GetCommandFlags("sv_soundscape_printdebuginfo");    // crashes server
        SetCommandFlags("sv_soundscape_printdebuginfo", flags1|FCVAR_CHEAT);
        
        new flags2 = GetCommandFlags("ai_test_los");                    // crashes server
        SetCommandFlags("ai_test_los", flags2|FCVAR_CHEAT);
    
        new flags3 = GetCommandFlags("kill");                    // crashes server
        SetCommandFlags("kill", flags2|FCVAR_CHEAT);
    
        new flags4 = GetCommandFlags("ToggleWav");                    // crashes server
        SetCommandFlags("ToggleWav", flags2|FCVAR_CHEAT);

    Can you please help me?
    __________________
    fpsbrian is offline
    Reply



    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 03:38.


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