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

[Any]Clear Invalid Client


Post New Thread Reply   
 
Thread Tools Display Modes
Author
AK978
Senior Member
Join Date: Jun 2018
Plugin ID:
6445
Plugin Version:
1.2
Plugin Category:
Server Management
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    delete
    Unapprover:
    Reason for Unapproving:
    Plugin blanked out / removed
    Old 02-24-2019 , 06:29   [Any]Clear Invalid Client
    Reply With Quote #1

    If not Client Connected or Client In Game or Valid Client,kick Client



    Cvar:
    sm_scan_client_time "5.0" //scan time


    log file:
    logs/clear_invalid_client.log
    (I have a record of kicking an invalid connection, the plugin should be valid)


    Version:
    1.0 new plugins
    1.1 CreateTimer change
    1.2 use hook



    My plugins

    Last edited by DarkDeviL; 02-28-2019 at 09:59. Reason: Restore to previous version.
    AK978 is offline
    eyal282
    Veteran Member
    Join Date: Aug 2011
    Old 02-24-2019 , 16:32   Re: [Any]Clear Invalid Client
    Reply With Quote #2

    Google "CreateTimer"

    Should be CreateTimer(5.0, Blah, _, TIMER_FLAG_NO_MAPCHANGE);

    Also your plugin is spamming timers in the count of the clients, just use "TIMER_FLAG_NO_MAPCHANGE|TIMER_REPEAT" once in "OnMapStart"
    __________________
    I am available to make plugins for pay.

    Discord: Eyal282#1334

    Last edited by eyal282; 02-24-2019 at 16:33.
    eyal282 is offline
    AK978
    Senior Member
    Join Date: Jun 2018
    Old 02-24-2019 , 17:05   Re: [Any]Clear Invalid Client
    Reply With Quote #3

    Timer has been modified
    v1.1

    use hook
    v1.2

    Last edited by AK978; 02-25-2019 at 05:23.
    AK978 is offline
    Dragokas
    Veteran Member
    Join Date: Nov 2017
    Location: Ukraine on fire
    Old 02-25-2019 , 17:04   Re: [Any]Clear Invalid Client
    Reply With Quote #4

    I'm curious, what that clients are?
    Is it something like internet bots who request info from the server.

    I constantly have some player from USA join to my server. His name is "Whaats" who change its IP. It is invisible in game, but he waste 1 slot. Maybe, your plugin could help?
    __________________
    Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
    [My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
    Dragokas is online now
    AK978
    Senior Member
    Join Date: Jun 2018
    Old 02-25-2019 , 19:45   Re: [Any]Clear Invalid Client
    Reply With Quote #5

    I am afraid that I will be wrong when scanning a single client, so scan 1~maxclient

    Some client disconnection will get stuck in the client index, mainly to delete this invalid client, this plugin is also in the test phase

    Many plugins are not perfect, and invalid clients can easily cause an exception to the server.

    The test found that this plugin removed players who lacked a custom map, and invalid infected people.

    There are very few error logs on my server, so I need to test it for a long time.
    Maybe you can perfect it

    Last edited by AK978; 02-26-2019 at 08:59.
    AK978 is offline
    eyal282
    Veteran Member
    Join Date: Aug 2011
    Old 02-26-2019 , 06:33   Re: [Any]Clear Invalid Client
    Reply With Quote #6

    Quote:
    Originally Posted by AK978 View Post
    I am afraid that I will be wrong when scanning a single client, so scan 1~maxclient

    Some client disconnection will get stuck in the slot, mainly to delete this invalid client, this plugin is also in the test phase

    Many plugins are not perfect, and invalid clients can easily cause an exception to the server.

    The test found that this plugin removed players who lacked a custom map, and invalid infected people.

    There are very few error logs on my server, so I need to test it for a long time.
    Maybe you can perfect it
    *Drums* *pause* just delete the useless plugin that produces the error, which by the way some plugins produce inevitable errors for example when looping through all client indexes without IsClientInGame or pushing client index into a timer instead of user id.
    __________________
    I am available to make plugins for pay.

    Discord: Eyal282#1334
    eyal282 is offline
    Dragokas
    Veteran Member
    Join Date: Nov 2017
    Location: Ukraine on fire
    Old 02-26-2019 , 16:49   Re: [Any]Clear Invalid Client
    Reply With Quote #7

    Strange code.
    Why do you use these events:
    Code:
    	HookEvent("player_spawn", ScanAllClient);
    	HookEvent("player_death", ScanAllClient);
    	HookEvent("player_afk", ScanAllClient);
    	HookEvent("round_start", ScanAllClient);
    rather than using something like OnClientConnect forward.

    And why check all players together rather than concrete one.

    btw, afaik, OnClientPutInServer should garantee client is in game.
    Quote:
    GetClientCount() will include clients as they are passed through this function, as clients are already in game at this point.
    https://sm.alliedmods.net/new-api/cl...entPutInServer

    Also, your flag parameter position is misplaced in CreateTimer function.
    Also, IsClientInGame() is internally includes IsClientConnected() check.
    Also, don't understand the logic, why do you need repeatable timer rather than using 1 check. It's possibly very problematic to define concrete max time because client e.g. could download additional files at the moment.

    Here is a similar plugin: https://forums.alliedmods.net/showth...=103203&page=6
    __________________
    Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
    [My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]

    Last edited by Dragokas; 02-26-2019 at 16:55.
    Dragokas is online now
    AK978
    Senior Member
    Join Date: Jun 2018
    Old 02-26-2019 , 17:40   Re: delete
    Reply With Quote #8

    have the same type of plugin, I will remove this plugin

    Compiling I am a beginner, my English ability is not good, and some places have misunderstood.
    I will study the part you pointed out again.

    Last edited by AK978; 02-26-2019 at 17:44.
    AK978 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 11:36.


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