diff --git a/MultiServerChat/MultiServerChat.cs b/MultiServerChat/MultiServerChat.cs index 53e698a..e4081ed 100644 --- a/MultiServerChat/MultiServerChat.cs +++ b/MultiServerChat/MultiServerChat.cs @@ -18,6 +18,27 @@ public class MultiServerChat : TerrariaPlugin { ConfigFile Config = new ConfigFile(); private string savePath = ""; + + public override string Author + { + get { return "Zack Piispanen"; } + } + + public override string Description + { + get { return "Facilitate chat between servers."; } + } + + public override string Name + { + get { return "Multiserver Chat"; } + } + + public override Version Version + { + get{ return new Version(1, 0, 0, 0); } + } + public MultiServerChat(Main game) : base(game) { savePath = Path.Combine(TShock.SavePath, "multiserverchat.json"); @@ -31,6 +52,15 @@ public override void Initialize() TShock.RestApi.Register(new SecureRestCommand("/msc", RestChat, "msc.canchat")); } + protected override void Dispose(bool disposing) + { + if (disposing) + { + ServerApi.Hooks.ServerChat.Deregister(this, OnChat); + } + base.Dispose(disposing); + } + private object RestChat(RestVerbs verbs, IParameterCollection parameters, SecureRest.TokenData tokenData) { if (!string.IsNullOrWhiteSpace(parameters["message"]))