搜索
查看: 15818|回复: 70

[AMXX 带源码] 有效防止假人攻击的插件,只针对fake player快速进出

  [复制链接]
发表于 2013-2-11 14:07:57 | 显示全部楼层 |阅读模式 来自 山东
由于绝对有效,所以大家必须顶,已经测试n个服
#include <amxmodx>
#include <celltrie>
#define PLUGIN "floodban" //Plugin will ban fake flooder Zeal method (new)
#define VERSION "0.1"
#define AUTHOR "mazdan"

new Trie:g_u_ip_warn
new Trie:g_u_time

public plugin_init()
{
        register_plugin(PLUGIN, VERSION, AUTHOR);
        g_u_ip_warn=TrieCreate();
        g_u_time=TrieCreate();
        set_task(360.0,"arrclear",_,_,_,"b")
}

public arrclear()
{
        TrieClear(g_u_ip_warn)
        TrieClear(g_u_time)
}
public client_connect(id)
{
        if(is_user_bot(id)) return;
        new ip[32]
        new ltime
        get_user_ip(id,ip,31,0)
        if(!ip[0]) return;
        if (!TrieKeyExists(g_u_ip_warn, ip))
        {
                TrieSetCell(g_u_ip_warn,ip,1);
        }
        else
        {
                TrieGetCell(g_u_time,ip,ltime);
                if(!(get_systime()-ltime))
                {
                        new warn
                        TrieGetCell(g_u_ip_warn,ip,warn)
                        if(++warn>4)
                        {
                                new uip[32]
                                get_user_ip(id,uip,31,1)
                                server_cmd("addip 600.0 %s",uip)
                                TrieDeleteKey(g_u_ip_warn, ip);
                        }
                        else
                                TrieSetCell(g_u_ip_warn,ip,warn)
                }
        }
        TrieSetCell(g_u_time,ip,get_systime());
}
发表于 2013-2-11 14:09:28 | 显示全部楼层 来自 广东深圳
头个支持.哈深受这个毒害好久了
回复

使用道具 举报

发表于 2013-2-11 14:09:45 | 显示全部楼层 来自 广东阳江
需要回复。。。
回复

使用道具 举报

发表于 2013-2-11 16:17:44 | 显示全部楼层 来自 甘肃天水
我来瞅瞅吧
回复

使用道具 举报

发表于 2013-2-11 22:02:27 | 显示全部楼层 来自 天津
看看你这个事什么=-O我已防假人了,但不知道为啥还挂服。
回复

使用道具 举报

发表于 2013-2-11 22:09:10 | 显示全部楼层 来自 天津
只是屏蔽了玩家connect快速进服,这样会不会玩家也进入不了哪。还是没完全修复啊!
回复

使用道具 举报

发表于 2013-2-11 22:10:12 | 显示全部楼层 来自 上海杨浦区
这个攻击去年就没用了...居然现在还有人被攻击?
回复

使用道具 举报

发表于 2013-2-12 17:24:40 | 显示全部楼层 来自 河南
这是个什么插件??
回复

使用道具 举报

发表于 2013-2-12 18:12:51 | 显示全部楼层 来自 广东汕头
???ds312:das sa ds:(萨达第三方斯蒂芬
回复

使用道具 举报

发表于 2013-2-12 22:54:32 | 显示全部楼层 来自 四川成都
看看到底是什么东西
回复

使用道具 举报

游客
回复
您需要登录后才可以回帖 登录 | 注个册吧

快速回复 返回顶部 返回列表