From a79b346d3c5d10f0a22276b591469eabba282e8f Mon Sep 17 00:00:00 2001 From: k0rd Date: Thu, 16 Feb 2012 23:00:22 -0500 Subject: [PATCH] support group modification and deleting usernames containing a DOT (.) --- TShockAPI/Commands.cs | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/TShockAPI/Commands.cs b/TShockAPI/Commands.cs index 44539bfe..f685cbd4 100755 --- a/TShockAPI/Commands.cs +++ b/TShockAPI/Commands.cs @@ -583,8 +583,11 @@ namespace TShockAPI // User deletion requires a username else if (subcmd == "del" && args.Parameters.Count == 2) { - var user = new User(); - if (args.Parameters[1].Contains(".")) + var user = new User(); + if (args.Parameters[1].Split('.').Count() ==4) + + // changed to support dot character in usernames + // if (args.Parameters[1].Contains(".")) user.Address = args.Parameters[1]; else user.Name = args.Parameters[1]; @@ -629,8 +632,12 @@ namespace TShockAPI // Group changing requires a username or IP address, and a new group to set else if (subcmd == "group") { - var user = new User(); - if (args.Parameters[1].Contains(".")) + var user = new User(); + if (args.Parameters[1].Split('.').Count()==4) + + //changed to support dot character in usernames + //if (args.Parameters[1].Contains(".")) + user.Address = args.Parameters[1]; else user.Name = args.Parameters[1];