MudEngine:
- Some minor changes to removal of unwanted characters in commands.
This commit is contained in:
parent
29cdae3b1a
commit
bc05eba56e
2 changed files with 11 additions and 3 deletions
|
@ -41,11 +41,16 @@ namespace MudEngine.Commands
|
|||
}
|
||||
|
||||
if (!foundName)
|
||||
{
|
||||
if (input == "")
|
||||
continue;
|
||||
else
|
||||
{
|
||||
isLegal = true;
|
||||
player.Name = input;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
player.Send("Welcome " + player.Name + "!");
|
||||
|
||||
|
|
|
@ -214,6 +214,8 @@ namespace MudEngine.GameObjects.Characters
|
|||
String str;
|
||||
List<byte> correctedBuffer = new List<byte>();
|
||||
System.Text.UTF8Encoding enc = new System.Text.UTF8Encoding();
|
||||
|
||||
/*
|
||||
foreach (byte i in buffer)
|
||||
{
|
||||
if (i == 255)
|
||||
|
@ -223,7 +225,8 @@ namespace MudEngine.GameObjects.Characters
|
|||
else
|
||||
correctedBuffer.Add(i);
|
||||
}
|
||||
str = enc.GetString(correctedBuffer.ToArray());
|
||||
*/
|
||||
str = enc.GetString(buffer.ToArray());
|
||||
return str;
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue