Release Anti-Invisible Name
#11
My version of it. Only allows ASCII characters.
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; public override void OnServerLoad() { try { ServerPrint("\n ASCIIName loaded \n Author: zxz0O0 \n Thanks to Nukem, Jariz and Pozzuh\n"); ServerPrint(" youtube.com/zxz0O0 \n itsmods.com\n"); command = GetServerCFG("ASCIIName", "Command", "kickClient"); srvMsg = GetServerCFG("ASCIIName", "ServerMsg", string.Empty); commandMsg = GetServerCFG("ASCIIName", "CommandMsg", string.Empty); } catch (Exception e) { ServerPrint(e.Message); } } public override void OnPlayerConnect(ServerClient Client) { if (Encoding.UTF8.GetByteCount(Client.Name) != Client.Name.Length) { if (!string.IsNullOrEmpty(srvMsg)) ServerSay(string.Format(srvMsg, Client.Name, Client.XUID), false); ServerPrint("ASCIIName executed: " + command + " " + Client.ClientNum + " \"" + commandMsg + "\""); ServerPrint("ASCIIName Name was: " + Client.Name); ServerCommand(command + " " + Client.ClientNum + " \"" + commandMsg + "\""); } } } }

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: 193)
[Image: azuw.jpg]

#12
thanks for these.
quite useful
[Image: c2ship5_sig.png]

#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]


#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

#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

#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]

#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: 109)

#18
still lets you just with just .. though
[Image: b_560_95_1.png]


[Image: b_560_95_1.png]


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

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

#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] ^_^



Possibly Related Threads…
Thread Author Replies Views Last Post
Wink [Release] Anti hardscope script mutant 6 9,520 06-10-2017, 09:31
Last Post: Erox
  [Release] Anti Hardscope Plugin 8q4s8 26 27,789 06-20-2015, 22:44
Last Post: urj88419
Brick [Release] Anti Premium [battlelog] JariZ 17 14,438 09-24-2012, 12:59
Last Post: finitore
  [Release] Anti Hitmarkers narkos 5 6,070 07-19-2012, 00:49
Last Post: jakata
  [Release] Anti SpawnKills narkos 2 3,864 07-14-2012, 18:42
Last Post: narkos
  [Release] Anti Flood plugin iAegle 10 12,407 03-22-2012, 13:09
Last Post: dthem_2000

Forum Jump:


Users browsing this thread:
13 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2026 Melroy van den Berg.