slightly change blahs format (maybe final)
This commit is contained in:
parent
7da97dbeb6
commit
33833c60ef
3 changed files with 6 additions and 6 deletions
|
|
@ -133,13 +133,13 @@ public class Requests
|
|||
|
||||
if (!Utils.IsValidUsername(entry.name, out string message))
|
||||
{
|
||||
await context.Response.WriteAsync($"error:invalid.username.{{{message}}}");
|
||||
await context.Response.WriteAsync(message);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!Utils.IsValidPassword(entry.pass, out message))
|
||||
{
|
||||
await context.Response.WriteAsync($"error:invalid.password.{{{message}}}");
|
||||
await context.Response.WriteAsync(message);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -567,7 +567,7 @@ public class Requests
|
|||
break;
|
||||
default:
|
||||
await context.Response.WriteAsync(Encryption.Encryption.EncryptString(
|
||||
$"error:unknown.request.{{{serializedBody.string1}}}"
|
||||
$"error:unknown.request:{serializedBody.string1}"
|
||||
, password));
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,10 +58,10 @@ public class Utils
|
|||
|
||||
public static bool IsValidUsername(string username, out string message)
|
||||
{
|
||||
message = "error:username.length.{3-18}";
|
||||
message = "error:username.length:3-18";
|
||||
if (string.IsNullOrWhiteSpace(username)) return false;
|
||||
if (username.Length is < 3 or > 18) return false;
|
||||
message = "error:username.conditions.allowed.{letters,numbers,underscores}";
|
||||
message = "error:username.conditions.allowed:letters;numbers;underscores";
|
||||
return USERNAME_REGEX.IsMatch(username);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ public class Requests
|
|||
startingMessage.timestamp = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds().ToString();
|
||||
startingMessage.type = "larp.info";
|
||||
startingMessage.content =
|
||||
"dm.begin.notice";
|
||||
"{blah(dm.begin.notice)}";
|
||||
startingMessage.key = ""; //no key == NOT encrypted
|
||||
startingMessage.pervious = "";
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue