Hacked clients can't send chat messages from other characters anymore
Also added sendername as userdata in chat messages, for now it's not used for anything but we'll probably find something where this is useful
This commit is contained in:
@@ -93,17 +93,17 @@ namespace Barotrauma.Networking
|
||||
name = name.Substring(0, 20);
|
||||
}
|
||||
string rName = "";
|
||||
for (int i=0;i<name.Length;i++)
|
||||
{
|
||||
if (name[i] < 32 || name[i] > 126)
|
||||
{
|
||||
//TODO: allow safe unicode characters, this is just to prevent players from taking names that look similar but aren't the same
|
||||
rName += '?';
|
||||
}
|
||||
else
|
||||
{
|
||||
rName += name[i];
|
||||
}
|
||||
for (int i=0;i<name.Length;i++)
|
||||
{
|
||||
if (name[i] < 32 || name[i] > 126)
|
||||
{
|
||||
//TODO: allow safe unicode characters, this is just to prevent players from taking names that look similar but aren't the same
|
||||
rName += '?';
|
||||
}
|
||||
else
|
||||
{
|
||||
rName += name[i];
|
||||
}
|
||||
}
|
||||
|
||||
return rName;
|
||||
@@ -125,7 +125,7 @@ namespace Barotrauma.Networking
|
||||
}
|
||||
|
||||
public bool HasPermission(ClientPermissions permission)
|
||||
{
|
||||
{
|
||||
return false; //Permissions.HasFlag(permission);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user