• 3 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Release] Anti-Invisible Name
#11
My version of it. Only allows ASCII characters.
CSHARP Code
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. using Addon;
  5.  
  6. namespace ASCIIName
  7. {
  8. public class Class1 : CPlugin
  9. {
  10. string command = "kickClient";
  11. string commandMsg = string.Empty;
  12. string srvMsg = string.Empty;
  13.  
  14. public override void OnServerLoad()
  15. {
  16. try
  17. {
  18. ServerPrint("\n ASCIIName loaded \n Author: zxz0O0 \n Thanks to Nukem, Jariz and Pozzuh\n");
  19. ServerPrint(" youtube.com/zxz0O0 \n itsmods.com\n");
  20.  
  21. command = GetServerCFG("ASCIIName", "Command", "kickClient");
  22. srvMsg = GetServerCFG("ASCIIName", "ServerMsg", string.Empty);
  23. commandMsg = GetServerCFG("ASCIIName", "CommandMsg", string.Empty);
  24. }
  25. catch (Exception e)
  26. {
  27. ServerPrint(e.Message);
  28. }
  29. }
  30.  
  31. public override void OnPlayerConnect(ServerClient Client)
  32. {
  33. if (Encoding.UTF8.GetByteCount(Client.Name) != Client.Name.Length)
  34. {
  35. if (!string.IsNullOrEmpty(srvMsg))
  36. ServerSay(string.Format(srvMsg, Client.Name, Client.XUID), false);
  37. ServerPrint("ASCIIName executed: " + command + " " + Client.ClientNum + " \"" + commandMsg + "\"");
  38. ServerPrint("ASCIIName Name was: " + Client.Name);
  39. ServerCommand(command + " " + Client.ClientNum + " \"" + commandMsg + "\"");
  40. }
  41. }
  42. }
  43. }


Options are
Code:
[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=
//Message to be displayed to the client who is being kicked
CommandMsg=


Attached Files
.zip   ASCIIName.zip (Size: 2.29 KB / Downloads: 154)
[Image: azuw.jpg]
  Reply
#12
thanks for these.
quite useful
[Image: c2ship5_sig.png]
  Reply
#13
i have been running this for a while now and on the whole it works a treat however i have noticed it is letting players in with just . and <> for a name, can you please make sure that these sort of names are excluded from joining please?
[Image: b_560_95_1.png]


[Image: b_560_95_1.png]

  Reply
#14
(04-18-2012, 01:02)hillbilly Wrote: i have been running this for a while now and on the whole it works a treat however i have noticed it is letting players in with just . and <> for a name, can you please make sure that these sort of names are excluded from joining please?

Ya I'm seeing that as well.. Nyan Cat just wanted to put that there xD
  Reply
#15
Someone can post an invisible name or how to do this? I need test the plugin because after that plugin no one with strage name join in me server xD
  Reply
#16
(04-18-2012, 04:46)Dumas Wrote: Someone can post an invisible name or how to do this? I need test the plugin because after that plugin no one with strage name join in me server xD
[Image: 9CsV8rZm3G.jpg]
[Image: lQDUjba.jpg]
  Reply
#17
deny some xuid and Anti-Invisible Name and ASCIIName

deny name include "">= you name >="Space" char,

Code:
using System;
using System.Collections.Generic;
using System.Text;
using Addon;

namespace ASCIIName
{
    public class Class1 : CPlugin
    {
        string command = "kickClient";
        string commandMsg = string.Empty;
        string srvMsg = string.Empty;
           string commandMsg1 = string.Empty;
        string badPlayers1 = "01100001e70d9398";
        List<string> badPlayers = new List<string>();
        int result;
        
        public override void OnServerLoad()
        {
            try
            {
                ServerPrint("ASCIIName loaded Author: zxz0O0 Thanks to Nukem, Jariz and Pozzuh\n and AntiInvisibleName plug master131 modify ljp");
                command = GetServerCFG("ASCIIName", "Command", "kickClient");
                srvMsg = GetServerCFG("ASCIIName", "ServerMsg", string.Empty);
                commandMsg = GetServerCFG("ASCIIName", "CommandMsg", string.Empty);
                commandMsg1 = GetServerCFG("ASCIIName", "CommandMsg1", string.Empty);
            
                string badPlayersXUID = GetServerCFG("ASCIIName","badPlayers_xuid", "");

                if(!badPlayers.Equals(""))
                    badPlayers = new List<string>(badPlayersXUID.ToLower().Split(','));
                
            }
            catch (Exception e)
            {
                ServerPrint(e.Message);
            }
        }

        public override void OnPlayerConnect(ServerClient Client)
        {
            if (0 == (result=string.Compare (badPlayers1 , Client.XUID)))
            {
                    ServerCommand(command + " " + Client.ClientNum + " \"" + commandMsg1 + "\"");  
            }
            
            foreach ( string bad in badPlayers )
            {
                if (0 == (result=string.Compare (bad , Client.XUID)))
                  {
                    ServerCommand(command + " " + Client.ClientNum + " \"" + commandMsg1 + "\"");  
                  }
            }
                            
            if (Encoding.UTF8.GetByteCount(Client.Name) != Client.Name.Length)
                {
                ServerSay(string.Format(srvMsg, Client.Name, Client.XUID), false);
                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 + "\"");
                }

        }
    }
}

sv_config.ini

Code:
[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,011000012c512cb2


Attached Files
.zip   test3.zip (Size: 2.52 KB / Downloads: 67)
  Reply
#18
still lets you just with just .. though
[Image: b_560_95_1.png]


[Image: b_560_95_1.png]

  Reply
#19
(04-19-2012, 22:03)hillbilly Wrote: still lets you just with just .. though

Anyone have any fixes? I get blank people now..
  Reply
#20
(04-25-2012, 03:04)DidUknowiPwn Wrote:
(04-19-2012, 22:03)hillbilly Wrote: still lets you just with just .. though

Anyone have any fixes? I get blank people now..

Same here. A player with a blank name. nothing. no dots.
Edit: ASCII characters only by zxz0O0 does the trick [tested] ^_^
  Reply


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

Forum Jump:


Users browsing this thread: 1 Guest(s)