Raised This Month: $32 Target: $400
 8% 

IP Blocking Easy Plugin?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Godofwar
AlliedModders Donor
Join Date: Dec 2015
Location: Germany
Old 07-24-2016 , 12:48   IP Blocking Easy Plugin?
Reply With Quote #1

Hello - i have since i have servers this big Problem ... this Bots comes to my servers with Nicknamens as Example: fsdaffusfjsdafsdfsdfsd and make advesting Connect 188.212.104.101 Free VIP ADMIN - i tried so much plugins here but no one was working to block that.

ANyone an idea for me ? Or a plugin which is working to block it ? ...
Godofwar is online now
xxxperts
Senior Member
Join Date: Oct 2013
Location: India
Old 07-24-2016 , 12:54   Re: IP Blocking Easy Plugin?
Reply With Quote #2

try Advanced Spam Protection.
__________________
All my work is here
xxxperts is offline
Craxor
Veteran Member
Join Date: Jan 2016
Location: Romania
Old 07-24-2016 , 13:15   Re: IP Blocking Easy Plugin?
Reply With Quote #3

Disable Dproto from your server :-P
Craxor is offline
Send a message via ICQ to Craxor
7thSense
Member
Join Date: Jul 2016
Old 07-24-2016 , 13:21   Re: IP Blocking Easy Plugin?
Reply With Quote #4

try this

PHP Code:
#include <amxmodx>

#define CHECK_TIME 30 // Timpul in secunde, pentru a tasta captcha in chat. Nu trebuie sa fie mai mic de 15.
#define IMMUNITY_FLAGS ADMIN_IMMUNITY // Jucatorii cu acest flag vor trece peste verificare.
#define DARK_SCREEN // Ecran negru in momentul verificarii. Comentati acest define daca nu aveti nevoie de aceasta optiune.
//#define HLTV_BOT_KICK // Kick HLTV sau Server Bots
//#define BLOCK_VOICE // Blocheaza microfonul, daca nu a trecut verificarea. Atentie nu folositi aceasta optiune daca aveti alte pluginuri care lucreaza cu voicechat
#define CHECK_ALWAYS // Dezactiveaza salvarea datelor intr-un fisier, si verifica clientul la fiecare conectare. Comentati acest define daca nu aveti nevoie de aceasta optiune.

new Captcha[33];

#if defined BLOCK_VOICE
    #include <fakemeta>
    #define    GetBit(%1,%2)        (%1 & (1 << (%2 & 31)))
    #define    SetBit(%1,%2)        %1 |= (1 << (%2 & 31))
    #define    ResetBit(%1,%2)        %1 &= ~(1 << (%2 & 31))
    
new g_bBlockVoice;
#endif

#if !defined CHECK_ALWAYS
    
new Trie:RealPlayersfszName[33][32], szSteamID[33][25], iFile[64];
#endif

#if defined DARK_SCREEN
    
new mScreenFade;
#endif

public plugin_init()
{
    
#define VERSION "1.5"
    
register_plugin("Captcha"VERSION"Factor");
    
    
#if !defined CHECK_ALWAYS
        
formatex(iFilecharsmax(iFile), "addons/amxmodx/data/[Captcha %s] RealPlayers.ini"VERSION);
        
RealPlayers TrieCreate();
        new 
buff[64], g_szName[32], g_szSteamID[25];
        
fopen(iFile"a+");
        if(!
fset_fail_state(iFile);
        while(!
feof(f))
        {
            
fgets(fbuffcharsmax(buff));
            
trim(buff);
            if(!
buff[0] || buff[0] == ';') continue;
            
parse(buffg_szNamecharsmax(g_szName), g_szSteamIDcharsmax(g_szSteamID));
            
TrieSetString(RealPlayersg_szNameg_szSteamID);
        }
        
fclose(f);
    
#endif
    
register_cvar("Captcha"VERSIONFCVAR_SERVER FCVAR_SPONLY);
    
register_clcmd("chooseteam""ChooseTeam_Hook"), register_clcmd("jointeam""ChooseTeam_Hook"), register_clcmd("joinclass""ChooseTeam_Hook"), register_clcmd("menuselect""ChooseTeam_Hook");
    
register_clcmd("say""Say_Hook"), register_clcmd("say_team""Say_Hook");
    
    
#if defined BLOCK_VOICE
        
register_forward(FM_Voice_SetClientListening"fwdSetClientListening"false);
    
#endif
    
    #if defined DARK_SCREEN
        
mScreenFade get_user_msgid("ScreenFade");
    
#endif
}

public 
Say_Hook(client)
{
    if(
Captcha[client] != 1)
    {
        static 
szMessage[16]; // [7] optimal
        
read_args(szMessage15), remove_quotes(szMessage), trim(szMessage);
        
        if(
str_to_num(szMessage) == Captcha[client])
        {
            
Captcha[client] = 1;
            
remove_task(client);
            
show_menu(client0"^n"1);
            
engclient_cmd(client"jointeam""0");
            
            
#if !defined CHECK_ALWAYS
                
TrieSetString(RealPlayersszName[client], szSteamID[client]);
                
fopen(iFile"a+");
                
fprintf(f"^n^"%s^" ^"%s^""szName[client], szSteamID[client]);
                
fclose(f);
            
#endif
            
            #if defined BLOCK_VOICE
                
ResetBit(g_bBlockVoiceclient);
            
#endif
            
            #if defined DARK_SCREEN
                
message_begin(MSG_ONE_UNRELIABLEmScreenFade_client);
                
write_short(1<<0);
                
write_short(1<<0);
                
write_short(1<<1);
                
write_byte(0);
                
write_byte(0);
                
write_byte(0);
                
write_byte(0);
                
message_end();
            
#endif
        
}
        else 
KickPlayer(client);
        
        return 
PLUGIN_HANDLED;
    }
    
    return 
PLUGIN_CONTINUE;
}

public 
client_putinserver(client)
{
    
#if !defined HLTV_BOT_KICK
        
if(is_user_bot(client) || is_user_hltv(client)) return;
    
#endif
    
    #if !defined CHECK_ALWAYS
    
static Steamid[25];
    
get_user_name(clientszName[client], charsmax(szName));
    
get_user_authid(clientszSteamID[client], charsmax(szSteamID));
    if(
TrieGetString(RealPlayersszName[client], Steamidcharsmax(Steamid)) && equal(SteamidszSteamID[client]) || user_with_immunity(client) || is_user_steam(client))
    
#else
    
if(user_with_immunity(client) || is_user_steam(client))
    
#endif
    
{
        
Captcha[client] = 1;
        return;
    }
    
    
set_msg_block(114BLOCK_ONCE), set_msg_block(96BLOCK_ONCE);
    
set_task(1.0"CheckClient"client);

    
#if defined BLOCK_VOICE
        
SetBit(g_bBlockVoiceclient);
    
#endif
}

public 
CheckClient(client)
{
    if(
float(CHECK_TIME) >= 15.0set_task(float(CHECK_TIME), "KickPlayer"client);
    else 
set_task(15.0"KickPlayer"client);
    
GenerateCaptcha(client);
    
    
#if defined DARK_SCREEN
        
message_begin(MSG_ONE_UNRELIABLEmScreenFade_client);
        
write_short(1<<0);
        
write_short(1<<0);
        
write_short(1<<2);
        
write_byte(0);
        
write_byte(0);
        
write_byte(0);
        
write_byte(255);
        
message_end();
    
#endif
}

public 
client_disconnect(client)
{
    
Captcha[client] = 0;
    
remove_task(client);
}

public 
ChooseTeam_Hook(client)
{
    if(
Captcha[client] != 1)
    {
        
GenerateCaptcha(client);
        return 
PLUGIN_HANDLED;
    }
    
    return 
PLUGIN_CONTINUE;
}

public 
GenerateCaptcha(client)
{
    static 
Text_Menu[156];
    
Captcha[client] = random_num(10009999);
    
formatex(Text_Menucharsmax(Text_Menu), "\r[Captcha]\w Verificare fake players.^nTasteaza \y%d\w in chat pentru a intra pe server."Captcha[client]);
    
client_print(clientprint_chat"[Captcha] O noua captcha a fost generata."VERSION);
    
show_menu(clientMENU_KEY_0Text_Menu);
}

public 
KickPlayer(clientserver_cmd("kick ^"#%d^" ^"Nu ai trecut verificarea fake players. Incearca din nou.^"", get_user_userid(client));

#if defined BLOCK_VOICE
public fwdSetClientListening(receiversender)
{
    if(
receiver != sender && GetBit(g_bBlockVoicesender))
    {
        
engfunc(EngFunc_SetClientListeningreceiversenderfalse);
        
forward_return(FMV_CELLfalse);
        return 
FMRES_SUPERCEDE;
    }
    return 
FMRES_IGNORED;
}
#endif

#if !defined CHECK_ALWAYS
public plugin_end() TrieDestroy(RealPlayers);
#endif

bool:user_with_immunity(client)  
{  
    if(
get_user_flags(client) & IMMUNITY_FLAGS) return true;
    return 
false;
}

stock is_user_steam(client)
{
    static 
dp_pointer;
    if(
dp_pointer || (dp_pointer get_cvar_pointer("dp_r_id_provider")))
    {
        
server_cmd("dp_clientinfo %d"client);
        
server_exec();
        return (
get_pcvar_num(dp_pointer) == 2) ? 0;
    }
    return 
0;

and this

PHP Code:
#include <amxmodx>

new const colors[] = 
{
    
"",
    
""
}

public 
plugin_init()
{
    
register_plugin("Block symbols""1.0""SpeeD")
    
register_clcmd("say","handle_say")
    
register_clcmd("say_team","handle_say")
}

public 
handle_say(id)
{
    static 
arg[256]
    
read_args(argcharsmax(arg))
    
remove_quotes(arg)
    
trim(arg)
    
    for(new 
0charsmax(colors); i++)
    {
        if(
containi(argcolors[i]) != -1)
        {
            
ColorMessage(id"Your message can't be^x04 colored")
            return 
PLUGIN_HANDLED
        
}
    }
    return 
PLUGIN_CONTINUE
}

stock ColorMessage(const id, const input[], any:...)
{
    new 
count 1players[32];
    static 
msg[191];
    
vformat(msg190input3);
    if (
idplayers[0] = id; else get_players(players count "ch");
    {
        for (new 
0counti++)
        {
            if (
is_user_connected(players[i]))
            {
                
message_begin(MSG_ONE_UNRELIABLE get_user_msgid("SayText"), _players[i]);
                
write_byte(players[i]);
                
write_string(msg);
                
message_end();
            }
        }
    }

P.S For the second put at the top of the plugins that edit chat
7thSense is offline
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 07-24-2016 , 13:50   Re: IP Blocking Easy Plugin?
Reply With Quote #5

Illegal servers are not supported here.
__________________
ddhoward is offline
Godofwar
AlliedModders Donor
Join Date: Dec 2015
Location: Germany
Old 07-25-2016 , 12:52   Re: IP Blocking Easy Plugin?
Reply With Quote #6

Quote:
#include <amxmodx>

#define CHECK_TIME 30 // Timpul in secunde, pentru a tasta captcha in chat. Nu trebuie sa fie mai mic de 15.
#define IMMUNITY_FLAGS ADMIN_IMMUNITY // Jucatorii cu acest flag vor trece peste verificare.
#define DARK_SCREEN // Ecran negru in momentul verificarii. Comentati acest define daca nu aveti nevoie de aceasta optiune.
//#define HLTV_BOT_KICK // Kick HLTV sau Server Bots
//#define BLOCK_VOICE // Blocheaza microfonul, daca nu a trecut verificarea. Atentie nu folositi aceasta optiune daca aveti alte pluginuri care lucreaza cu voicechat
#define CHECK_ALWAYS // Dezactiveaza salvarea datelor intr-un fisier, si verifica clientul la fiecare conectare. Comentati acest define daca nu aveti nevoie de aceasta optiune.

new Captcha[33];

#if defined BLOCK_VOICE
#include <fakemeta>
#define GetBit(%1,%2) (%1 & (1 << (%2 & 31)))
#define SetBit(%1,%2) %1 |= (1 << (%2 & 31))
#define ResetBit(%1,%2) %1 &= ~(1 << (%2 & 31))
new g_bBlockVoice;
#endif

#if !defined CHECK_ALWAYS
new Trie:RealPlayers, f, szName[33][32], szSteamID[33][25], iFile[64];
#endif

#if defined DARK_SCREEN
new mScreenFade;
#endif

public plugin_init()
{
#define VERSION "1.5"
register_plugin("Captcha", VERSION, "Factor");

#if !defined CHECK_ALWAYS
formatex(iFile, charsmax(iFile), "addons/amxmodx/data/[Captcha %s] RealPlayers.ini", VERSION);
RealPlayers = TrieCreate();
new
buff[64], g_szName[32], g_szSteamID[25];
f = fopen(iFile, "a+");
if(!
f) set_fail_state(iFile);
while(!
feof(f))
{
fgets(f, buff, charsmax(buff));
trim(buff);
if(!
buff[0] || buff[0] == ';') continue;
parse(buff, g_szName, charsmax(g_szName), g_szSteamID, charsmax(g_szSteamID));
TrieSetString(RealPlayers, g_szName, g_szSteamID);
}
fclose(f);
#endif
register_cvar("Captcha", VERSION, FCVAR_SERVER | FCVAR_SPONLY);
register_clcmd("chooseteam", "ChooseTeam_Hook"), register_clcmd("jointeam", "ChooseTeam_Hook"), register_clcmd("joinclass", "ChooseTeam_Hook"), register_clcmd("menuselect", "ChooseTeam_Hook");
register_clcmd("say", "Say_Hook"), register_clcmd("say_team", "Say_Hook");

#if defined BLOCK_VOICE
register_forward(FM_Voice_SetClientListening, "fwdSetClientListening", false);
#endif

#if defined DARK_SCREEN
mScreenFade = get_user_msgid("ScreenFade");
#endif
}

public
Say_Hook(client)
{
if(
Captcha[client] != 1)
{
static
szMessage[16]; // [7] optimal
read_args(szMessage, 15), remove_quotes(szMessage), trim(szMessage);

if(
str_to_num(szMessage) == Captcha[client])
{
Captcha[client] = 1;
remove_task(client);
show_menu(client, 0, "^n", 1);
engclient_cmd(client, "jointeam", "0");

#if !defined CHECK_ALWAYS
TrieSetString(RealPlayers, szName[client], szSteamID[client]);
f = fopen(iFile, "a+");
fprintf(f, "^n^"%s^" ^"%s^"", szName[client], szSteamID[client]);
fclose(f);
#endif

#if defined BLOCK_VOICE
ResetBit(g_bBlockVoice, client);
#endif

#if defined DARK_SCREEN
message_begin(MSG_ONE_UNRELIABLE, mScreenFade, _, client);
write_short(1<<0);
write_short(1<<0);
write_short(1<<1);
write_byte(0);
write_byte(0);
write_byte(0);
write_byte(0);
message_end();
#endif
}
else
KickPlayer(client);

return
PLUGIN_HANDLED;
}

return
PLUGIN_CONTINUE;
}

public
client_putinserver(client)
{
#if !defined HLTV_BOT_KICK
if(is_user_bot(client) || is_user_hltv(client)) return;
#endif

#if !defined CHECK_ALWAYS
static Steamid[25];
get_user_name(client, szName[client], charsmax(szName));
get_user_authid(client, szSteamID[client], charsmax(szSteamID));
if(
TrieGetString(RealPlayers, szName[client], Steamid, charsmax(Steamid)) && equal(Steamid, szSteamID[client]) || user_with_immunity(client) || is_user_steam(client))
#else
if(user_with_immunity(client) || is_user_steam(client))
#endif
{
Captcha[client] = 1;
return;
}

set_msg_block(114, BLOCK_ONCE), set_msg_block(96, BLOCK_ONCE);
set_task(1.0, "CheckClient", client);

#if defined BLOCK_VOICE
SetBit(g_bBlockVoice, client);
#endif
}

public
CheckClient(client)
{
if(
float(CHECK_TIME) >= 15.0) set_task(float(CHECK_TIME), "KickPlayer", client);
else
set_task(15.0, "KickPlayer", client);
GenerateCaptcha(client);

#if defined DARK_SCREEN
message_begin(MSG_ONE_UNRELIABLE, mScreenFade, _, client);
write_short(1<<0);
write_short(1<<0);
write_short(1<<2);
write_byte(0);
write_byte(0);
write_byte(0);
write_byte(255);
message_end();
#endif
}

public
client_disconnect(client)
{
Captcha[client] = 0;
remove_task(client);
}

public
ChooseTeam_Hook(client)
{
if(
Captcha[client] != 1)
{
GenerateCaptcha(client);
return
PLUGIN_HANDLED;
}

return
PLUGIN_CONTINUE;
}

public
GenerateCaptcha(client)
{
static
Text_Menu[156];
Captcha[client] = random_num(1000, 9999);
formatex(Text_Menu, charsmax(Text_Menu), "\r[Captcha]\w Verificare fake players.^nTasteaza \y%d\w in chat pentru a intra pe server.", Captcha[client]);
client_print(client, print_chat, "[Captcha] O noua captcha a fost generata.", VERSION);
show_menu(client, MENU_KEY_0, Text_Menu);
}

public
KickPlayer(client) server_cmd("kick ^"#%d^" ^"Nu ai trecut verificarea fake players. Incearca din nou.^"", get_user_userid(client));

#if defined BLOCK_VOICE
public fwdSetClientListening(receiver, sender)
{
if(
receiver != sender && GetBit(g_bBlockVoice, sender))
{
engfunc(EngFunc_SetClientListening, receiver, sender, false);
forward_return(FMV_CELL, false);
return
FMRES_SUPERCEDE;
}
return
FMRES_IGNORED;
}
#endif

#if !defined CHECK_ALWAYS
public plugin_end() TrieDestroy(RealPlayers);
#endif

bool:user_with_immunity(client)
{
if(
get_user_flags(client) & IMMUNITY_FLAGS) return true;
return
false;
}

stock is_user_steam(client)
{
static
dp_pointer;
if(
dp_pointer || (dp_pointer = get_cvar_pointer("dp_r_id_provider")))
{
server_cmd("dp_clientinfo %d", client);
server_exec();
return (
get_pcvar_num(dp_pointer) == 2) ? 1 : 0;
}
return
0;
}
DONT WORK !


To the second how to edit it ?


Quote:
#include <amxmodx>

new const colors[] =
{
"188.212.104.101",
"connect 188.212.104.101"
}

public
plugin_init()
{
register_plugin("Block symbols", "1.0", "SpeeD")
register_clcmd("say","handle_say")
register_clcmd("say_team","handle_say")
}

public
handle_say(id)
{
static
arg[256]
read_args(arg, charsmax(arg))
remove_quotes(arg)
trim(arg)

for(new
i = 0; i < charsmax(colors); i++)
{
if(
containi(arg, colors[i]) != -1)
{
ColorMessage(id, "Your message can't be^x04 colored")
return
PLUGIN_HANDLED
}
}
return
PLUGIN_CONTINUE
}

stock ColorMessage(const id, const input[], any:...)
{
new
count = 1, players[32];
static
msg[191];
vformat(msg, 190, input, 3);
if (
id) players[0] = id; else get_players(players , count , "ch");
{
for (new
i = 0; i < count; i++)
{
if (
is_user_connected(players[i]))
{
message_begin(MSG_ONE_UNRELIABLE , get_user_msgid("SayText"), _, players[i]);
write_byte(players[i]);
write_string(msg);
message_end();
}
}
}
}

Quote:
"188.212.104.101",
"connect 188.212.104.101"
?????????
Godofwar is online now
7thSense
Member
Join Date: Jul 2016
Old 07-25-2016 , 13:00   Re: IP Blocking Easy Plugin?
Reply With Quote #7

just compile this

PHP Code:
#include <amxmodx> 

new const colors[] =  

    
""
    
"" 


public 
plugin_init() 

    
register_plugin("Block symbols""1.0""SpeeD"
    
register_clcmd("say","handle_say"
    
register_clcmd("say_team","handle_say"


public 
handle_say(id

    static 
arg[256
    
read_args(argcharsmax(arg)) 
    
remove_quotes(arg
    
trim(arg
     
    for(new 
0charsmax(colors); i++) 
    { 
        if(
containi(argcolors[i]) != -1
        { 
            
ColorMessage(id"Your message can't be^x04 colored"
            return 
PLUGIN_HANDLED 
        

    } 
    return 
PLUGIN_CONTINUE 


stock ColorMessage(const id, const input[], any:...) 

    new 
count 1players[32]; 
    static 
msg[191]; 
    
vformat(msg190input3); 
    if (
idplayers[0] = id; else get_players(players count "ch"); 
    { 
        for (new 
0counti++) 
        { 
            if (
is_user_connected(players[i])) 
            { 
                
message_begin(MSG_ONE_UNRELIABLE get_user_msgid("SayText"), _players[i]); 
                
write_byte(players[i]); 
                
write_string(msg); 
                
message_end(); 
            } 
        } 
    } 

7thSense is offline
Godofwar
AlliedModders Donor
Join Date: Dec 2015
Location: Germany
Old 07-29-2016 , 12:58   Re: IP Blocking Easy Plugin?
Reply With Quote #8

the second dont work too...
Godofwar is online now
iNdio
Senior Member
Join Date: Apr 2015
Location: Ro
Old 07-29-2016 , 13:31   Re: IP Blocking Easy Plugin?
Reply With Quote #9

[1] You can block the chat and unlock it with a simple word: /chat (or whatever you want). Use plugin called Chat.
[2] You can block the chat and unlock it with a random word, plugin will change the "code" on every map. Use plugin called RandomChat.
[3] You can use GAG plugin (with this one, player will have gag after retry & map change).
They can't use anymore say, say_team & voice. Use plugin GAG & upload file: gag_words.ini in your /configs folder.
GAG Cvar:
PHP Code:
amx_autogag_time "10"  // how many minutes they have gag automatically
amx_gag_minute_limit "300" // limit for gag in minutes
amx_gag_minute_in_seconds "60" // minutes in seconds  (leave 60 here)
amx_admingag "0"  // if 0 = you can't gag the admins | if 1 = you can gag the admins
amx_maxwords "200" // max limit that gag_words.ini can contain 
[4] If all those "fake players" have the same IP, with this plugin you can block their IP Class.
Use plugin BlockIP. Example: Mine ip is 93.36.112.432. To block me, in BlockIP.sma you will modify:
PHP Code:
if(containi(ip"93.36") != -1
This means that all players who try to join with the class 93.36, plugin will block their connection.
I recommend to use GAG plugin, good luck.
Attached Files
File Type: sma Get Plugin or Get Source (Chat.sma - 509 views - 903 Bytes)
File Type: sma Get Plugin or Get Source (RandomChat.sma - 417 views - 1.9 KB)
File Type: sma Get Plugin or Get Source (GAG.sma - 222 views - 10.0 KB)
File Type: ini gag_words.ini (309 Bytes, 117 views)
File Type: sma Get Plugin or Get Source (BlockIP.sma - 484 views - 293 Bytes)
__________________
Where Cs had no value, amxx, sometimes, had its price...
iNdio is offline
siriusmd99
Veteran Member
Join Date: Oct 2013
Location: Republic of Moldova
Old 07-29-2016 , 16:53   Re: IP Blocking Easy Plugin?
Reply With Quote #10

Dont help him he has illegal server. Without dproto these bots cant join.
siriusmd99 is offline
Reply



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 17:31.


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