M Mamoru.cs => Mamoru.cs +5 -6
@@ 8,11 8,11 @@ namespace Mamoru;
public class Mamoru {
public static Mamoru? Instance { get; private set; }
public PluginHandler? Handler { get; private set; }
- [PluginConfig] public Config Config;
+ [PluginConfig] public readonly Config? Config;
- public ConfigManager ConfigManager = null!;
- public RoutesManager RoutesManager = null!;
- public ConnectionsManager ConnectionsManager = null!;
+ public ConfigManager? ConfigManager;
+ public RoutesManager? RoutesManager;
+ public ConnectionsManager? ConnectionsManager;
[PluginPriority(LoadPriority.Low)]
[PluginEntryPoint("Mamoru", "1.0.0-alpha", "An uncomplicated moderation tool for SCP: SL.", "furry")]
@@ 22,10 22,9 @@ public class Mamoru {
ConfigManager = new ConfigManager();
RoutesManager = new RoutesManager();
-// ConnectionsManager = new ConnectionsManager();
+ ConnectionsManager = new ConnectionsManager();
Log.Info("Mamoru was enabled.");
- Log.Info(Instance.Config.ToString());
}
[PluginUnload]
M Models.Mamoru/GetServerStatusResponse.cs => Models.Mamoru/GetServerStatusResponse.cs +1 -1
@@ 3,6 3,6 @@ namespace Mamoru.Models.Mamoru;
public class GetServerStatusResponse {
public bool Auth { get; set; }
public bool Webhooks { get; set; }
- public string PluginAPIVersion { get; set; }
+ public string PluginApiVersion { get; set; }
public string MamoruVersion { get; set; }
}=
\ No newline at end of file
M Resources/MiscResource.cs => Resources/MiscResource.cs +2 -2
@@ 16,8 16,8 @@ public static class MiscResource {
var status = new GetServerStatusResponse {
Auth = true,
Webhooks = true,
- MamoruVersion = Mamoru.Instance!.Handler!.PluginVersion,
- PluginAPIVersion = PluginAPI.PluginApiVersion.VersionString
+ MamoruVersion = Mamoru.Instance?.Handler?.PluginVersion ?? "unknown",
+ PluginApiVersion = PluginAPI.PluginApiVersion.VersionString
};
ctx.Response.ContentType = "application/yaml";