File: ping_kick.lua - Tab length: 1 2 4 8 - Lines: on off - No wrap: on off

PLUGIN_NAME = "Ping kick"
PLUGIN_AUTHOR = "Baruch" -- hlepouse@gmail.com
PLUGIN_VERSION = "29 dec 2012"

include("ac_server")

function say(text, cn)
  if cn == nil then cn = -1 end
  clientprint(cn, text)
end

LuaLoop()
    for cn = 0, maxclient() - 1 do
        if isconnected(cn) then
            if getping(cn) >= 600 then
                say(string.format("\f2 [SERVER INFO] \f1 Player \f2%s \f1was kicked for lagging", getname(cn)))
                disconnect(cn, DISC_NONE)
            end
        end
    end
end