Raised This Month: $ Target: $400
 0% 

What line to use in order to block only domain name ?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
guipatinador
SourceMod Donner Party
Join Date: Oct 2009
Location: Poortugal
Old 07-09-2012 , 19:31   Re: What line to use in order to block only domain name ?
Reply With Quote #2

you use restrict names only for that?
you can use this if you want

Spoiler
untested but should work.

edit1: dont work lol.

containi version,

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

#define ADMIN_LEVEL ADMIN_BAN // change the admin level if you want

public plugin_init()
{
    
register_plugin("block domain name""1.0""guipatinador")
    
register_forward(FM_ClientUserInfoChanged"forward_client_userinfochanged")
}

public 
forward_client_userinfochanged(id)
{
    if(
is_user_connected(id) || !(get_user_flags(id) & ADMIN_LEVEL))
    {
        new 
name[32]
        
get_user_name(idnamecharsmax(name))
        
        if((
containi(name,".com") != -1) ||
        (
containi(name,".ro") != -1) ||
        (
containi(name,".ru") != -1) ||
        (
containi(name,".info") != -1) ||
        (
containi(name,".eu") != -1) ||
        (
containi(name,".biznet") != -1) ||
        (
containi(name,".org") != -1))
            
        
server_cmd("kick #%d ^"Nickname not allowed here.^""get_user_userid(id))
    }
    return 
PLUGIN_CONTINUE


Last edited by guipatinador; 07-09-2012 at 20:06.
guipatinador is offline
 



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 15:15.


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