MudEngine:

- Some minor changes to removal of unwanted characters in commands.
This commit is contained in:
Scionwest_cp 2010-08-01 19:26:26 -07:00
parent 29cdae3b1a
commit bc05eba56e
2 changed files with 11 additions and 3 deletions

View file

@ -42,8 +42,13 @@ namespace MudEngine.Commands
if (!foundName) if (!foundName)
{ {
isLegal = true; if (input == "")
player.Name = input; continue;
else
{
isLegal = true;
player.Name = input;
}
} }
} }

View file

@ -214,6 +214,8 @@ namespace MudEngine.GameObjects.Characters
String str; String str;
List<byte> correctedBuffer = new List<byte>(); List<byte> correctedBuffer = new List<byte>();
System.Text.UTF8Encoding enc = new System.Text.UTF8Encoding(); System.Text.UTF8Encoding enc = new System.Text.UTF8Encoding();
/*
foreach (byte i in buffer) foreach (byte i in buffer)
{ {
if (i == 255) if (i == 255)
@ -223,7 +225,8 @@ namespace MudEngine.GameObjects.Characters
else else
correctedBuffer.Add(i); correctedBuffer.Add(i);
} }
str = enc.GetString(correctedBuffer.ToArray()); */
str = enc.GetString(buffer.ToArray());
return str; return str;
} }
else else