Raised This Month: $404 Target: $400
 101% 

Stop Reliable Channel Overflows


Post New Thread Reply   
 
Thread Tools Display Modes
Author
aSmig
Junior Member
Join Date: Nov 2008
Plugin ID:
920
Plugin Version:
1.0.2
Plugin Category:
All
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Stop Reliable Channel Overflows by kicking and optionally banning clients who flood the server with commands that generate a text response.
    Old 06-06-2009 , 22:14   Stop Reliable Channel Overflows
    Reply With Quote #1

    This plugin stops Reliable Channel Overflows by kicking and optionally banning clients who flood the server with commands that generate a text response. A flood is defined here as more than 3 commands with less than a 5 second gap between each. This stops the annoying "Client X overflowed reliable channel" attack. When a client triggers this plugin, their name and SteamID are printed in the chat area for all to see. If you do not set any of the cvars, the default action is to permenantly ban attackers by SteamID. If you don't want to ban people, or would like to ban them for a short time, set the appropriate cvars in server.cfg as defined in the ConVars section below.

    Based on block_crash by Viper2026 for EventScripts. If you use EventScripts on your server already, check out block_crash.

    Commands:
    • none
    ConVars:
    • stoprco_version
      • The current version of StopRCO. This is read-only and is provided for HLSW and other 3rd party applications.
    • stoprco_ban (default 1)
      • Set to 1 if offenders should be banned.
    • stoprco_bantime (default 0)
      • Set to the number of minutes to ban for (0 is forever)
    Installation:
    • From .smx
      • Download StopRCO.smx by using the "Get Plugin" link below. Place StopRCO.smx in your addons/sourcemod/plugins directory. Set cvars in server.cfg if you like.
    Changelog:
    • 0.1.0
      • Initial testing.
    • 1.0.0
      • First release.
    • 1.0.1
      • Fixed "Invalid timer handle" errors.
    • 1.0.2
      • Fixed "Client index 0 is invalid" via rcon errors.
      • Added sm_timeleft, sm_nextmap, ping, and status.

    Thanks to CShadowRun, Viper2026 and #sourcemod.
    Attached Files
    File Type: sp Get Plugin or Get Source (StopRCO.sp - 1726 views - 2.6 KB)

    Last edited by aSmig; 10-31-2009 at 08:05. Reason: Bug fixes
    aSmig is offline
    KyleS
    SourceMod Plugin Approver
    Join Date: Jul 2009
    Location: Segmentation Fault.
    Old 07-21-2009 , 19:41   Re: Stop Reliable Channel Overflows
    Reply With Quote #2

    This works great! Banned one moronic spammer from my server.

    Andy50 - STEAM_0:1:23720677
    KyleS is offline
    zeroibis
    Veteran Member
    Join Date: Jun 2007
    Old 07-30-2009 , 14:44   Re: Stop Reliable Channel Overflows
    Reply With Quote #3

    Had an exploiter on the server last night, put this plugin on the server really fast and bam! There ass was banned
    __________________
    zeroibis is offline
    bobbobagan
    SourceMod Donor
    Join Date: May 2007
    Location: New Zealand
    Old 07-31-2009 , 08:27   Re: Stop Reliable Channel Overflows
    Reply With Quote #4

    You missed a few commands.

    Like ff, sm_timeleft, sm_nextmap

    Also, is there support for SourceBans?
    __________________
    bobbobagan is offline
    Send a message via Skype™ to bobbobagan
    zeroibis
    Veteran Member
    Join Date: Jun 2007
    Old 08-24-2009 , 20:17   Re: Stop Reliable Channel Overflows
    Reply With Quote #5

    My error logs are all filled with this:

    Quote:
    L 08/24/2009 - 12:49:00: SourceMod error session started
    L 08/24/2009 - 12:49:00: Info (map "de_dust") (file "errors_20090824.log")
    L 08/24/2009 - 12:49:00: [SM] Native "KillTimer" reported: Invalid timer handle 0 (error 4)
    L 08/24/2009 - 12:49:00: [SM] Displaying call stack trace for plugin "StopRCO.smx":
    L 08/24/2009 - 12:49:00: [SM] [0] Line 37, /home/groups/alliedmodders/forums/files/4/3/7/9/3/43362.attach::OnClientDisconnect_Post()
    L 08/24/2009 - 12:49:15: [SM] Native "KillTimer" reported: Invalid timer handle 0 (error 4)
    L 08/24/2009 - 12:49:15: [SM] Displaying call stack trace for plugin "StopRCO.smx":
    L 08/24/2009 - 12:49:15: [SM] [0] Line 37, /home/groups/alliedmodders/forums/files/4/3/7/9/3/43362.attach::OnClientDisconnect_Post()
    L 08/24/2009 - 12:50:20: [SM] Native "KillTimer" reported: Invalid timer handle 0 (error 4)
    L 08/24/2009 - 12:50:20: [SM] Displaying call stack trace for plugin "StopRCO.smx":
    L 08/24/2009 - 12:50:20: [SM] [0] Line 37, /home/groups/alliedmodders/forums/files/4/3/7/9/3/43362.attach::OnClientDisconnect_Post()
    L 08/24/2009 - 12:53:44: [SM] Native "KillTimer" reported: Invalid timer handle 0 (error 4)
    L 08/24/2009 - 12:53:44: [SM] Displaying call stack trace for plugin "StopRCO.smx":
    L 08/24/2009 - 12:53:44: [SM] [0] Line 37, /home/groups/alliedmodders/forums/files/4/3/7/9/3/43362.attach::OnClientDisconnect_Post()
    L 08/24/2009 - 13:00:26: [SM] Native "KillTimer" reported: Invalid timer handle 0 (error 4)
    L 08/24/2009 - 13:00:26: [SM] Displaying call stack trace for plugin "StopRCO.smx":
    L 08/24/2009 - 13:00:26: [SM] [0] Line 37, /home/groups/alliedmodders/forums/files/4/3/7/9/3/43362.attach::OnClientDisconnect_Post()
    L 08/24/2009 - 13:009: [SM] Native "KillTimer" reported: Invalid timer handle 0 (error 4)
    L 08/24/2009 - 13:009: [SM] Displaying call stack trace for plugin "StopRCO.smx":
    L 08/24/2009 - 13:009: [SM] [0] Line 37, /home/groups/alliedmodders/forums/files/4/3/7/9/3/43362.attach::OnClientDisconnect_Post()
    L 08/24/2009 - 13:009: [SM] Native "KillTimer" reported: Invalid timer handle 0 (error 4)
    L 08/24/2009 - 13:009: [SM] Displaying call stack trace for plugin "StopRCO.smx":
    L 08/24/2009 - 13:009: [SM] [0] Line 37, /home/groups/alliedmodders/forums/files/4/3/7/9/3/43362.attach::OnClientDisconnect_Post()
    L 08/24/2009 - 13:00:53: [SM] Native "KillTimer" reported: Invalid timer handle 0 (error 4)
    L 08/24/2009 - 13:00:53: [SM] Displaying call stack trace for plugin "StopRCO.smx":
    L 08/24/2009 - 13:00:53: [SM] [0] Line 37, /home/groups/alliedmodders/forums/files/4/3/7/9/3/43362.attach::OnClientDisconnect_Post()
    L 08/24/2009 - 13:02:46: [SM] Native "KillTimer" reported: Invalid timer handle 0 (error 4)
    L 08/24/2009 - 13:02:46: [SM] Displaying call stack trace for plugin "StopRCO.smx":
    L 08/24/2009 - 13:02:46: [SM] [0] Line 37, /home/groups/alliedmodders/forums/files/4/3/7/9/3/43362.attach::OnClientDisconnect_Post()
    L 08/24/2009 - 13:03:03: [SM] Native "KillTimer" reported: Invalid timer handle 0 (error 4)
    L 08/24/2009 - 13:03:03: [SM] Displaying call stack trace for plugin "StopRCO.smx":
    L 08/24/2009 - 13:03:03: [SM] [0] Line 37, /home/groups/alliedmodders/forums/files/4/3/7/9/3/43362.attach::OnClientDisconnect_Post()
    L 08/24/2009 - 13:03:09: [SM] Native "KillTimer" reported: Invalid timer handle 0 (error 4)
    L 08/24/2009 - 13:03:09: [SM] Displaying call stack trace for plugin "StopRCO.smx":
    L 08/24/2009 - 13:03:09: [SM] [0] Line 37, /home/groups/alliedmodders/forums/files/4/3/7/9/3/43362.attach::OnClientDisconnect_Post()
    L 08/24/2009 - 13:034: [SM] Native "KillTimer" reported: Invalid timer handle 0 (error 4)
    L 08/24/2009 - 13:034: [SM] Displaying call stack trace for plugin "StopRCO.smx":
    L 08/24/2009 - 13:034: [SM] [0] Line 37, /home/groups/alliedmodders/forums/files/4/3/7/9/3/43362.attach::OnClientDisconnect_Post()
    L 08/24/2009 - 13:03:41: [SM] Native "KillTimer" reported: Invalid timer handle 0 (error 4)
    L 08/24/2009 - 13:03:41: [SM] Displaying call stack trace for plugin "StopRCO.smx":
    L 08/24/2009 - 13:03:41: [SM] [0] Line 37, /home/groups/alliedmodders/forums/files/4/3/7/9/3/43362.attach::OnClientDisconnect_Post()
    L 08/24/2009 - 13:06:42: [SM] Native "KillTimer" reported: Invalid timer handle 0 (error 4)
    L 08/24/2009 - 13:06:42: [SM] Displaying call stack trace for plugin "StopRCO.smx":
    L 08/24/2009 - 13:06:42: [SM] [0] Line 37, /home/groups/alliedmodders/forums/files/4/3/7/9/3/43362.attach::OnClientDisconnect_Post()
    L 08/24/2009 - 13:07:13: [SM] Native "KillTimer" reported: Invalid timer handle 0 (error 4)
    L 08/24/2009 - 13:07:13: [SM] Displaying call stack trace for plugin "StopRCO.smx":
    L 08/24/2009 - 13:07:13: [SM] [0] Line 37, /home/groups/alliedmodders/forums/files/4/3/7/9/3/43362.attach::OnClientDisconnect_Post()
    L 08/24/2009 - 13:07:44: [SM] Native "KillTimer" reported: Invalid timer handle 0 (error 4)
    L 08/24/2009 - 13:07:44: [SM] Displaying call stack trace for plugin "StopRCO.smx":
    L 08/24/2009 - 13:07:44: [SM] [0] Line 37, /home/groups/alliedmodders/forums/files/4/3/7/9/3/43362.attach::OnClientDisconnect_Post()
    L 08/24/2009 - 13:08:24: [SM] Native "KillTimer" reported: Invalid timer handle 0 (error 4)
    L 08/24/2009 - 13:08:24: [SM] Displaying call stack trace for plugin "StopRCO.smx":
    L 08/24/2009 - 13:08:24: [SM] [0] Line 37, /home/groups/alliedmodders/forums/files/4/3/7/9/3/43362.attach::OnClientDisconnect_Post()
    L 08/24/2009 - 13:08:24: [SM] Native "KillTimer" reported: Invalid timer handle 0 (error 4)
    L 08/24/2009 - 13:08:24: [SM] Displaying call stack trace for plugin "StopRCO.smx":
    L 08/24/2009 - 13:08:24: [SM] [0] Line 37, /home/groups/alliedmodders/forums/files/4/3/7/9/3/43362.attach::OnClientDisconnect_Post()
    L 08/24/2009 - 13:08:24: [SM] Native "KillTimer" reported: Invalid timer handle 0 (error 4)
    L 08/24/2009 - 13:08:24: [SM] Displaying call stack trace for plugin "StopRCO.smx":
    L 08/24/2009 - 13:08:24: [SM] [0] Line 37, /home/groups/alliedmodders/forums/files/4/3/7/9/3/43362.attach::OnClientDisconnect_Post()
    L 08/24/2009 - 13:08:24: [SM] Native "KillTimer" reported: Invalid timer handle 0 (error 4)
    L 08/24/2009 - 13:08:24: [SM] Displaying call stack trace for plugin "StopRCO.smx":
    L 08/24/2009 - 13:08:24: [SM] [0] Line 37, /home/groups/alliedmodders/forums/files/4/3/7/9/3/43362.attach::OnClientDisconnect_Post()
    L 08/24/2009 - 13:08:24: [SM] Native "KillTimer" reported: Invalid timer handle 0 (error 4)
    L 08/24/2009 - 13:08:24: [SM] Displaying call stack trace for plugin "StopRCO.smx":
    L 08/24/2009 - 13:08:24: [SM] [0] Line 37, /home/groups/alliedmodders/forums/files/4/3/7/9/3/43362.attach::OnClientDisconnect_Post()
    L 08/24/2009 - 13:08:24: [SM] Native "KillTimer" reported: Invalid timer handle 0 (error 4)
    L 08/24/2009 - 13:08:24: [SM] Displaying call stack trace for plugin "StopRCO.smx":
    L 08/24/2009 - 13:08:24: [SM] [0] Line 37, /home/groups/alliedmodders/forums/files/4/3/7/9/3/43362.attach::OnClientDisconnect_Post()
    L 08/24/2009 - 13:08:24: [SM] Native "KillTimer" reported: Invalid timer handle 0 (error 4)
    L 08/24/2009 - 13:08:24: [SM] Displaying call stack trace for plugin "StopRCO.smx":
    L 08/24/2009 - 13:08:24: [SM] [0] Line 37, /home/groups/alliedmodders/forums/files/4/3/7/9/3/43362.attach::OnClientDisconnect_Post()
    L 08/24/2009 - 13:08:24: [SM] Native "KillTimer" reported: Invalid timer handle 0 (error 4)
    L 08/24/2009 - 13:08:24: [SM] Displaying call stack trace for plugin "StopRCO.smx":
    L 08/24/2009 - 13:08:24: [SM] [0] Line 37, /home/groups/alliedmodders/forums/files/4/3/7/9/3/43362.attach::OnClientDisconnect_Post()
    L 08/24/2009 - 13:08:24: [SM] Native "KillTimer" reported: Invalid timer handle 0 (error 4)
    L 08/24/2009 - 13:08:24: [SM] Displaying call stack trace for plugin "StopRCO.smx":
    L 08/24/2009 - 13:08:24: [SM] [0] Line 37, /home/groups/alliedmodders/forums/files/4/3/7/9/3/43362.attach::OnClientDisconnect_Post()
    L 08/24/2009 - 13:08:24: [SM] Native "KillTimer" reported: Invalid timer handle 0 (error 4)
    L 08/24/2009 - 13:08:24: [SM] Displaying call stack trace for plugin "StopRCO.smx":
    L 08/24/2009 - 13:08:24: [SM] [0] Line 37, /home/groups/alliedmodders/forums/files/4/3/7/9/3/43362.attach::OnClientDisconnect_Post()
    L 08/24/2009 - 13:08:24: Error log file session closed.
    __________________
    zeroibis is offline
    Kigen
    BANNED
    Join Date: Feb 2008
    Old 08-25-2009 , 02:52   Re: Stop Reliable Channel Overflows
    Reply With Quote #6

    Ya, you need more accurate checks on your handles.

    Handles are fairly annoying and just to note KillTimers does not close the handle, it just stops the timer.

    You need to change KillTimers to CloseHandle and also check if the handle has been defined and when the timer is executed empty it.

    Handles are is a lot of fun. *sarcasm*
    Kigen is offline
    aSmig
    Junior Member
    Join Date: Nov 2008
    Old 08-26-2009 , 09:11   Re: Stop Reliable Channel Overflows
    Reply With Quote #7

    Quote:
    Originally Posted by bobbobagan View Post
    You missed a few commands.

    Like ff, sm_timeleft, sm_nextmap

    Also, is there support for SourceBans?
    I'm only responding to console commands. The ones you listed are chat commands. You should have another plugin do spam control for chat stuff. As for SourceBans, I haven't added support for that but certainly could. It isn't something I have worked with before. Look for this in a future version.

    In other news, the "Invalid timer handle" errors are now fixed. Thanks for the tips, Kigen.
    aSmig is offline
    psychonic

    BAFFLED
    Join Date: May 2008
    Old 08-26-2009 , 10:16   Re: Stop Reliable Channel Overflows
    Reply With Quote #8

    Quote:
    Originally Posted by Kigen View Post
    You need to change KillTimers to CloseHandle and also check if the handle has been defined and when the timer is executed empty it.
    Is the api documentation incorrect? For KillTimer(), it says "Use this instead of CloseHandle() if you need more options."
    psychonic is offline
    Kigen
    BANNED
    Join Date: Feb 2008
    Old 09-08-2009 , 23:59   Re: Stop Reliable Channel Overflows
    Reply With Quote #9

    Indeed, it says "Use this instead of CloseHandle() if you need more options." Which in your case I'm assuming you don't need more options since you are just planning to kill the timer and discard it, CloseHandle() will do all of that.
    Kigen is offline
    Dragonshadow
    BANNED
    Join Date: Jun 2008
    Old 09-09-2009 , 03:57   Re: Stop Reliable Channel Overflows
    Reply With Quote #10

    Quote:
    Originally Posted by aSmig View Post
    I'm only responding to console commands. The ones you listed are chat commands. You should have another plugin do spam control for chat stuff. As for SourceBans, I haven't added support for that but certainly could. It isn't something I have worked with before. Look for this in a future version.

    In other news, the "Invalid timer handle" errors are now fixed. Thanks for the tips, Kigen.
    sm_timeleft and sm_nextmap are console commands.
    Dragonshadow 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 15:27.


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