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

[DELETED]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Shadowless
Member
Join Date: May 2018
Old 01-16-2019 , 10:03   [DELETED]
Reply With Quote #1

---

Last edited by Shadowless; 05-19-2019 at 05:53.
Shadowless is offline
Send a message via ICQ to Shadowless
Nutu_
AlliedModders Donor
Join Date: Mar 2016
Location: Germany
Old 01-16-2019 , 11:08   Re: [req] blacklist ip
Reply With Quote #2

in your case what's blacklist meaning?
you want to ban by ip spamers? or gag, or kick?
__________________
a simple act of caring creates an endless ripple.
Nutu_ is offline
X3.
Junior Member
Join Date: Sep 2018
Old 01-16-2019 , 11:49   Re: [req] blacklist ip
Reply With Quote #3

Quote:
Originally Posted by Nutu_ View Post
in your case what's blacklist meaning?
you want to ban by ip spamers? or gag, or kick?
I think he means to add IPS in a text file (.ini). And when the user with this IP connects, the server automatically kicks him with a reason of not whitelisted, or you're blacklisted from this server. Not a ban, or its kinda like IP adress ban but he can control it from the file to add and remove

Last edited by X3.; 01-16-2019 at 11:50.
X3. is offline
Mordekay
Squirrel of Fortune
Join Date: Apr 2006
Location: Germany
Old 01-16-2019 , 11:58   Re: [req] blacklist ip
Reply With Quote #4

Banning by IP is simply stupid. Once the one you wanted to ban and anotherone gets this IP he will be banned for no reason. Hence why STEAM_ID was designed.
Why do you want to ban by IP instead?
__________________

Mordekay is offline
Old 01-16-2019, 13:13
Shadowless
This message has been deleted by Shadowless.
Mordekay
Squirrel of Fortune
Join Date: Apr 2006
Location: Germany
Old 01-16-2019 , 13:36   Re: [req] blacklist ip
Reply With Quote #5

Simply enable logging for ban/unban and remove those admin rights who unban banned IDs. Whatever system you choose, admins can unban anyone.
__________________

Mordekay is offline
Old 01-16-2019, 13:52
Shadowless
This message has been deleted by Shadowless.
Old 01-16-2019, 13:55
Shadowless
This message has been deleted by Shadowless.
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 01-16-2019 , 15:20   Re: [req] blacklist ip
Reply With Quote #6

https://forums.alliedmods.net/showthread.php?t=267526
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Old 01-16-2019, 15:37
Shadowless
This message has been deleted by Shadowless.
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 01-16-2019 , 16:42   Re: [req] blacklist ip
Reply With Quote #7

Quote:
Originally Posted by Shadowless View Post
looks like CRONjob ?
Not exactly. You can assign the kick command on IP addresses and the player will get kicked once he joins.
__________________

Last edited by OciXCrom; 01-16-2019 at 16:42.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Old 01-17-2019, 03:14
raizo11
This message has been deleted by raizo11.
raizo11
BANNED
Join Date: Dec 2013
Location: https://t.me/pump_upp
Old 01-17-2019 , 12:33   Re: [req] blacklist ip
Reply With Quote #8

Code:
#include <amxmodx>
#include <amxmisc>

new Trie:g_BlockIp;
new g_File[ 64 ];

new const Message[] = "Ip Blocked";

public plugin_init() 
{
    new szData[ 35 ];
    
    g_BlockIp = TrieCreate();
    
    copy( g_File[ get_localinfo( "amxx_configsdir" , g_File , charsmax( g_File ) ) ] , charsmax( g_File ) , "/IpWhiteLits.ini" );
    
    new f = fopen( g_File , "rt" );
    
    while( !feof( f ) )
    {
        fgets( f , szData , charsmax( szData ) );
     
        trim( szData );
        
        if( !szData[0] || szData[0] == ';' || szData[0] == '/' && szData[1] == '/' ) 
            continue;
            
        TrieSetCell( g_BlockIp , szData , 1 );
    }
    
    fclose( f );
    
    register_concmd( "amx_blockip" , "Add_User_Ip" , ADMIN_KICK , "<IP> - Add User IP to list" );
}

public client_connect( id )
{
    new szIP[ 32 ];
    
    get_user_ip(id, szIP, charsmax(szIP), 1);

    if ( TrieKeyExists( g_BlockIp , szIP[ contain( szIP, "" ) + 1 ]) )
    {
        message_begin( MSG_ONE, SVC_DISCONNECT, .player = id );
        write_string( Message );
        message_end();
    }
    else
    {
        //nothing
    }
}

public Add_User_Ip( id , level , cid )
{
    if ( !cmd_access( id , level , cid , 2 ) )
        return PLUGIN_HANDLED;
        
    new szIP[ 32 ];

    if ( read_argv( 1 , szIP , charsmax( szIP ) ) )
    {
        if ( !TrieKeyExists( g_BlockIp , szIP ) )
        {
            TrieSetCell( g_BlockIp , szIP , 1 );
            write_file( g_File , szIP );
            console_print( id , "* Added IP ^"%s^" to list." , szIP );
        }
        else
        {
            console_print( id , "* IP ^"%s^" already exists in list." , szIP );
        }
    }
    
    return PLUGIN_HANDLED;
}
raizo11 is offline
Send a message via ICQ to raizo11 Send a message via AIM to raizo11 Send a message via MSN to raizo11 Send a message via Yahoo to raizo11 Send a message via Skype™ to raizo11
Old 01-17-2019, 16:31
Shadowless
This message has been deleted by Shadowless.
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 16:38.


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