• 3 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Release Anti-Invisible Name
#21
Quote:[ASCIIName]
//Command to be executed, kickClient, tempBanClient or banClient
Command=kickClient
//Message to be displayed when an action is taken, valid placeholders {0} - name and {1} xuid
ServerMsg=User was name bad!
//Message to be displayed to the client who is being kicked
CommandMsg=Change you name (use 0-9 and a-Z)
CommandMsg1=Same ID,Change you ID
badPlayers_xuid=xuid6,xuid7,xuid8
//example:badPlayers_xuid=0110000112181148,01100001707af3ec,0110000123862132,01100​0012c512cb2

i need to autokick xuid 0000000000000000
it really annoying, it always cause all being ban.[/quote]
  Reply
#22
sorry for my poor english.
modify version
-------sv_config.ini---------
Code:
[ASCIIName]
//Command to be executed, kickClient, tempBanClient or banClient
Command=dropclient

//Message to be displayed to the client who is being kicked
CommandMsg=Change you name (use 0-9 and a-Z)

//message to be dispalyed to the xuid e70d9398 deny connect
CommandMsg1=Error ID,Please change you ID.

//deny bad xuid connect
badPlayers_xuid=0110000112181148,01100001707af3ec,0110000123862132,0110000100000000

--------source code--------
Code:
using System;
using System.Collections.Generic;
//using System.Collections;
using System.Text;
//using System.IO;
//using System.Threading;
//using System.Timers;
using Addon;

namespace ASCIIName
{
    public class Class_Asciiname : CPlugin
    {
        string command = "dropClient";
        string commandMsg = string.Empty;
           string commandMsg1 = string.Empty;
        string commandMsg2 = "You is a bad Player,deny connect";
        string badPlayers1 = "01100001e70d9398";
        List<string> badPlayers = new List<string>();
        List<string> allplayers = new List<string>();
        List<string> allplayers_name = new List<string>();
        List<ServerClient> clientss = new List<ServerClient>();

        public override void OnServerLoad()
        {
            try
            {
                ServerPrint("ASCIIName loaded Author: zxz0O0 Thanks to Nukem, Jariz and Pozzuh\n and AntiInvisibleName plug mod ljp");
                command = GetServerCFG("ASCIIName", "Command", "dropClient");    
            }
            catch (Exception e)
            {
                ServerPrint(e.Message.ToString());
            }
        }
        
        public override void OnPlayerConnect(ServerClient Client)
        {

            commandMsg = GetServerCFG("ASCIIName", "CommandMsg", string.Empty);
            
            if (Encoding.UTF8.GetByteCount(Client.Name) != Client.Name.Length)
            {
                ServerPrint("ASCIIName executed: " + command + " " + Client.Name + " \"" + commandMsg + "\"");
                ServerCommand(command + " " + Client.ClientNum + " \"" + commandMsg + "\"");    
            }
            else if (Array.Exists(Client.Name.ToCharArray(), c => (int)c <= 31) || Array.Exists(Client.Name.ToCharArray(), c => (int)c >= 191) )
            {
                    ServerPrint("ASCIIName executed Invisible name: " + command + " " + Client.Name + " \"" + commandMsg + "\"");
                    ServerCommand(command + " " + Client.ClientNum + " \"" + commandMsg + "\"");
            }

            if (!allplayers.Contains(Client.XUID) || !allplayers_name.Contains(Client.Name))
            {
                allplayers.Add(Client.XUID);
                allplayers_name.Add (Client.Name);
                ServerSay("^7[^1NOTICE!^7] Player: ^3" + Client.Name + "^7 has connected!", false);
            }
            else
            {
                ServerSay("^7[^2Welcome!^7] Player: ^3" + Client.Name + "^7 has Reconnected!", false);    
            }
        }
            

        public override string OnCheckBan(string xuidd)
        {
            commandMsg1 = GetServerCFG("ASCIIName", "CommandMsg1", string.Empty);
            string badPlayersXUID = GetServerCFG("ASCIIName","badPlayers_xuid", "");
            if(!badPlayersXUID.Equals(""))
            {
                badPlayers = new List<string>(badPlayersXUID.ToLower().Split(','));
            }
            
            ServerPrint ("xuidd is " + xuidd + " try connect");
            
            if (badPlayers1.Equals(xuidd))
            {
                ServerSay("^7Player[E70D].xuid: ^3" + badPlayers1 + "^7 Deny connect!", false);
                return commandMsg1;
            }

            foreach ( string bad in badPlayers )
            {
                if(bad.Equals(xuidd))
                {
                    ServerSay("^7Player.xuid[Bad]: ^3" + bad + "^7 Deny connect!", false);
                    return commandMsg2;  
                }
            }
            
            clientss = GetClients();
            foreach (ServerClient game_boy in clientss)
            {
                if (game_boy.Name != "")
                ServerPrint ("Xuid "+ game_boy.XUID + " Name " + game_boy.Name + " Ping " + game_boy.Ping + " CLient_Num " + game_boy.ClientNum);
                if (game_boy.Name != "" && game_boy.XUID == xuidd)
                {
                    ServerSay("^7Same.xuid in game ^3" + xuidd + "^7 Deny connect! ", false);
                    iPrintLnBold ("^1[Warn:] ^3Have same ID player try connect to server",game_boy);
                    return "Sorry! Same ID players in game,you change ID try connect.";
                }
            }
            clientss.Clear();
            return null;
        }
    }
}


.rar   AntiInvisibleName.rar (Size: 3.29 KB / Downloads: 140)
  Reply
#23
(05-29-2012, 02:06)Devilion Wrote:
Quote:[ASCIIName]
//Command to be executed, kickClient, tempBanClient or banClient
Command=kickClient
//Message to be displayed when an action is taken, valid placeholders {0} - name and {1} xuid
ServerMsg=User was name bad!
//Message to be displayed to the client who is being kicked
CommandMsg=Change you name (use 0-9 and a-Z)
CommandMsg1=Same ID,Change you ID
badPlayers_xuid=xuid6,xuid7,xuid8
//example:badPlayers_xuid=0110000112181148,01100001707af3ec,0110000123862132,01100​0012c512cb2

i need to autokick xuid 0000000000000000
it really annoying, it always cause all being ban.
[/quote]

Are you sure !xuid is 0000000000000000
  Reply
#24
can you give me a plugin, but these messages are not displayed, because teasing

ServerSay("^7[^1NOTICE!^7] Player: ^3" + Client.Name + "^7 has connected!", false);
ServerSay("^7[^2Welcome!^7] Player: ^3" + Client.Name + "^7 has Reconnected!", false);

???????????????????????????????????????????????????????????????????????????????
  Reply
#25
Nice plugin. Thanks!
  Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  [Release] iSnipe anti hardscope mutant 0 2,025 11-06-2013, 11:27
Last Post: mutant
  Need An Anti Hack Manuadminmod worldclass 2 1,746 10-14-2013, 09:57
Last Post: d0h!²
  Searching for Anti HS ExoGamer* 10 2,667 08-08-2013, 12:39
Last Post: aceed
  Help [QUESTION][IDEA] Invisible Wall 99IRock 8 2,560 03-03-2013, 14:37
Last Post: Nekochan
Wink Preview ANTI ZOOMBYE! [HARD] Tony. 9 2,691 03-02-2013, 17:35
Last Post: Nukem
  [Request] MW3 anti TI smasher MADD_DOGG 3 1,458 12-17-2012, 13:52
Last Post: MADD_DOGG
  Mw3 anti-cheat estebespt 18 8,912 12-04-2012, 22:50
Last Post: claudiocorona
  anti-hack ersin_ 8 2,779 10-29-2012, 14:45
Last Post: SuperNovaAO
  [Request] Anti block Plugin | Infected Kasperle 2 1,368 10-06-2012, 18:41
Last Post: DidUknowiPwn
  [Tutorial] Anti-Lag Guide iPaddie 5 2,928 09-28-2012, 18:56
Last Post: JariZ

Forum Jump:


Users browsing this thread: 1 Guest(s)