Fix errors. about mommi config variables

This commit is contained in:
Pieter-Jan Briers
2020-12-19 02:34:41 +01:00
parent 9bb42d5251
commit 185923a7da
2 changed files with 8 additions and 2 deletions

View File

@@ -82,6 +82,12 @@ namespace Content.Server
var password = _configurationManager.GetCVar(CCVars.StatusMoMMIPassword); var password = _configurationManager.GetCVar(CCVars.StatusMoMMIPassword);
if (string.IsNullOrEmpty(password))
{
response.StatusCode = (int) HttpStatusCode.Forbidden;
return true;
}
OOCPostMessage message = null; OOCPostMessage message = null;
try try
{ {

View File

@@ -12,10 +12,10 @@ namespace Content.Shared
*/ */
public static readonly CVarDef<string> StatusMoMMIUrl = public static readonly CVarDef<string> StatusMoMMIUrl =
CVarDef.Create<string>("status.mommiurl", null); CVarDef.Create("status.mommiurl", "", CVar.SERVERONLY);
public static readonly CVarDef<string> StatusMoMMIPassword = public static readonly CVarDef<string> StatusMoMMIPassword =
CVarDef.Create<string>("status.mommipassword", null); CVarDef.Create("status.mommipassword", "", CVar.SERVERONLY);
/* /*