Veteran Member
Join Date: Jan 2014
Location: Astral planes
|
12-08-2018
, 00:43
Re: HighPingKicker OLO Based/Updated [06/12/2018]
|
#48
|
Thanks for the response. The main take away. [TAG] the log with something with plugin name and ping. Everything in my environment is working as designed. What is CS MOD? Do you mean Counter-Strike? If so that is not true. It is not required to run this.
Many admins do not have log on in server.cfg. This plugin does not put anything in amxmodx/logs ever no matter what unless one fails to drop the lang file in it's place. Too primal. Clean default install the generated config does not execute. It just makes a file. If you are really serious about this put a echo line in so one can grep if it is working on not, no non-sense.
echo "HighPingKicker is running..."
Changing bits like disconnect to disconnected per deprecated and calling it a new plugin not backwards compatible. Ja. Rejoice I am very happy. This is proof your plugin with my recommended settings handles business. I have enough players with 30 ping. When I have it set to 300 ping (250+50) from Yet and and 50 lcp ping flux. That is 2 kickers failing. Yours knocked it out. See how fast the ping surged? Log is below .... scroll. The longer we entertain bad traffic the harder it is to mitigate in my experiences.
Quote:
example.sma (118 ) : warning 233 : symbol "client_disconnect" is marked as deprecated: Use client_disconnected() instead.
|
Quote:
Originally Posted by iceeedr
~>There are many examples: client_disconnected (id), ..
|
That's too easy.
Keep up the good work and enthusiasm. We do not want to kick everybody under 0 ping. That's bad. I just dewiskered this. It is still saved to disk rather unchanged. The stated limits and what was really possible were mismatching.
Next and most importantly. Allowing a default min ping of 0 kicks everybody on connect. Lets assume admin will put in 0 by mistake at some point. AMX admin can not even join. Somebody with rcon or console access will need to take care of it or wait for map change. Deal breaker. The config file the admins were told doesn't exe them back to 200 like the compile has. Screwed. I placed 111 in there for illustration. If admin wanted to put in 100, but input 10 by mistake 111 will be assigned as fail-safe. If you are going to drive that auto file I was afraid you were going to say it's the new way. I researched it and although we agreed it is a good idea to make 3rd party plugins start all abiding to a new directory in configs/testing or whatever that would be a lot cleaner going forward.
//new ping kicker
amx_ping 350
amx_check 1
amx_delay 1
amx_tests 1
//Yet another
amx_maxping 250
amx_maxping_add 50
lame_connection_punisher:::
today - 00: 38:48: Kick: "NAME<135><STEAM_0:0:#><>" was kicked by "Console" (message ""Your ping is too unstable."")
new:::
today - 00:48: 34: Kick: "NAME<142><STEAM_0:0:#><>" was kicked by "Console" (message ""You got kicked because your ping is too high."")
Yet another::
today - 02:53:26: [testing/Yet.amxx] NAME<STEAM_0:0:#> was kicked for having to high a ping (was 321)
today - 02:53:26: Kick: "NAME<173><STEAM_0:0:#><>" was kicked by "Console" (message "Ping too high")
HL1 tested. Log above approved.
Code:
//Use this code on lamers or else you have just become one.
//Kicks high UDP Ping.
#include <amxmodx>
#include <amxmisc>
#define TASKWARN 1996
#define TASKSET 2996
#define TASKCHECK 3996
new g_Ping[MAX_PLAYERS +1]
new g_Samples[MAX_PLAYERS +1]
new VarPing, VarCheck, VarTest, VarDelay, cVarPing, cVarCheck, cVarTest, cVarDelay
public plugin_init()
{
register_plugin("High Ping Kicker", "0.6","OLO & iceeedR") //Based on OLO version
register_concmd("amx_hpk","cmdHpk", ADMIN_KICK )
register_cvar("NewPingkicker", "0.6", FCVAR_SERVER | FCVAR_SPONLY )
register_dictionary("highpingkicker.txt")
bind_pcvar_num(cVarPing = create_cvar("amx_ping","200", .description = "The maximum ping allowed before being kicked.", .has_min = true, .min_val = 111.0, .has_max = false), VarPing)
bind_pcvar_num(cVarCheck = create_cvar("amx_check","3", .description = "Time between Checks", .has_min = true, .min_val = 1.0, .has_max = false), VarCheck)
bind_pcvar_num(cVarTest = create_cvar("amx_tests","5", .description = "Checkcount", .has_min = true, .min_val = 0.0, .has_max = false), VarTest)
bind_pcvar_num(cVarDelay = create_cvar("amx_delay","15", .description = "Delay between checks", .has_min = true, .min_val = 1.0, .has_max = false), VarDelay)
}
public client_disconnected(id)
remove_task(id + TASKCHECK)
public client_putinserver(id)
{
g_Ping[id] = g_Samples[id] = 0
if(!is_user_bot(id))
{
set_task_ex( 10.0 , "showWarn" , id + TASKWARN, .flags = SetTask_Once)
if (VarTest != 0)
{
set_task_ex( float(VarDelay), "taskSetting", id + TASKSET, .flags = SetTask_Once)
}
else
{
set_task_ex( float(VarCheck) , "checkPing" , id + TASKCHECK, .flags = SetTask_Repeat)
}
}
}
public showWarn(taskId)
{
new id = taskId - TASKWARN
client_print_color(id, print_team_red,"%L", id ,"WARNING_MESSAGE", VarPing)
}
public taskSetting(taskId)
{
new id = taskId - TASKSET
set_task_ex( float(VarCheck) , "checkPing" , id + TASKCHECK, .flags = SetTask_Repeat)
}
kickPlayer( id )
{
new TranslatedMessage[50]
formatex(TranslatedMessage, charsmax(TranslatedMessage), "%L", id, "KICK_MESSAGE2")
server_cmd("kick #%d ^"%s^"", get_user_userid(id), TranslatedMessage)
}
public checkPing(taskId)
{
new id = taskId - TASKCHECK
if ( get_user_flags(id) & ADMIN_IMMUNITY ) return
new Ping, Loss
get_user_ping( id , Ping , Loss )
g_Ping[ id ] += Ping
++g_Samples[ id ]
if((g_Samples[ id ] >= VarTest) && (g_Ping[id] / g_Samples[id]) >= VarPing)
{
remove_task(id + TASKCHECK)
client_print_color(id, print_team_red,"%L", id, "KICK_MESSAGE", id, VarPing)
kickPlayer(id)
}
}
public cmdHpk(id,level,cid)
{
if (!cmd_access(id,level,cid,4))
return PLUGIN_HANDLED
set_pcvar_num(cVarPing,read_argv_int(1))
set_pcvar_num(cVarCheck,read_argv_int(2))
set_pcvar_num(cVarTest,read_argv_int(3))
set_pcvar_num(cVarDelay,read_argv_int(4))
console_print(id, "%L", id, "PRECONFIGURATION_MESSAGE")
console_print(id, "%L", id, "CONFIGURATION_MESSAGE", VarPing, VarCheck, VarTest, VarDelay)
return PLUGIN_HANDLED
}
__________________
Last edited by DJEarthQuake; 12-08-2018 at 00:46.
Reason: scroll log
|
|