Post Reply 
 
Thread Rating:
  • 2 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Release Anti-Invisible Name
04-06-2012, 16:32
Post: #11
RE: Anti-Invisible Name
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=

Related links


Attached File(s)
.zip  ASCIIName.zip (Size: 2.29 KB / Downloads: 98)

[Image: azuw.jpg]
Find all posts by this user
Add Thank You Quote this message in a reply
[-] The following 5 users say Thank You to zxz0O0 for this post:
AboAlwe (06-04-2012), blueberry9 (04-13-2012), Dumas (04-14-2012), hillbilly (04-06-2012), JoSchaap (04-06-2012)
04-13-2012, 04:10
Post: #12
RE: Anti-Invisible Name
thanks for these.
quite useful

[Image: c2ship5_sig.png]
Find all posts by this user
Add Thank You Quote this message in a reply
04-18-2012, 01:02
Post: #13
RE: Anti-Invisible Name
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]
Find all posts by this user
Add Thank You Quote this message in a reply
04-18-2012, 04:22
Post: #14
RE: Anti-Invisible Name
(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
Related links
Find all posts by this user
Add Thank You Quote this message in a reply
04-18-2012, 04:46
Post: #15
RE: Anti-Invisible Name
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
Find all posts by this user
Add Thank You Quote this message in a reply
04-18-2012, 05:52
Post: #16
RE: Anti-Invisible Name
(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]

(11-25-2012 14:44)kokole Wrote:  Scammer or not, that's why I never buy from people.
Visit this user's website Find all posts by this user
Add Thank You Quote this message in a reply
04-19-2012, 07:06 (This post was last modified: 04-19-2012 07:27 by jiuweiljp.)
Post: #17
RE: Anti-Invisible Name
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,01100​0012c512cb2


Attached File(s)
.zip  test3.zip (Size: 2.52 KB / Downloads: 41)
Find all posts by this user
Add Thank You Quote this message in a reply
[-] The following 2 users say Thank You to jiuweiljp for this post:
AboAlwe (06-05-2012), zxz0O0 (04-19-2012)
04-19-2012, 22:03
Post: #18
RE: Anti-Invisible Name
still lets you just with just .. though
Related links

[Image: b_560_95_1.png]


[Image: b_560_95_1.png]
Find all posts by this user
Add Thank You Quote this message in a reply
04-25-2012, 03:04
Post: #19
RE: Anti-Invisible Name
(04-19-2012 22:03)hillbilly Wrote:  still lets you just with just .. though

Anyone have any fixes? I get blank people now..
Find all posts by this user
Add Thank You Quote this message in a reply
05-28-2012, 05:38 (This post was last modified: 06-05-2012 15:32 by AboAlwe.)
Post: #20
RE: Anti-Invisible Name
(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] ^_^
Find all posts by this user
Add Thank You Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  [Release] Anti Hitmarkers narkos 5 1,145 07-19-2012 00:49
Last Post: jakata
  [Release] Anti SpawnKills narkos 2 823 07-14-2012 18:42
Last Post: narkos
  [Release] Anti Flood plugin iAegle 10 2,293 03-22-2012 13:09
Last Post: dthem_2000

Forum Jump:


User(s) browsing this thread: 1 Guest(s)
Media Embeding by Simple Audio Video Embeder