Add Torch client mod. Currently supports dialogs and notifications.

Add dialog output to !longhelp
Add !notify command
Silently inserts mod into session when client connects, server admins don't need to do anything to enable it.
This commit is contained in:
Brant Martin
2018-06-10 07:31:19 -04:00
parent d8915d1893
commit 045a572058
12 changed files with 501 additions and 7 deletions

View File

@@ -18,6 +18,7 @@ using Torch.API;
using Torch.API.Managers;
using Torch.API.Session;
using Torch.Commands;
using Torch.Mod;
using Torch.Server.Commands;
using Torch.Server.Managers;
using Torch.Utils;
@@ -45,7 +46,7 @@ namespace Torch.Server
private Timer _watchdog;
/// <inheritdoc />
public TorchServer(TorchConfig config = null)
public TorchServer(TorchConfig config = null)
{
DedicatedInstance = new InstanceManager(this);
AddManager(DedicatedInstance);
@@ -174,10 +175,14 @@ namespace Torch.Server
{
_watchdog?.Dispose();
_watchdog = null;
ModCommunication.Unregister();
}
if (newState == TorchSessionState.Loaded)
{
CurrentSession.Managers.GetManager<CommandManager>().RegisterCommandModule(typeof(WhitelistCommands));
ModCommunication.Register();
}
}
/// <inheritdoc />