From 1148c42e1d12281b84efaab05d443d982bfe766c Mon Sep 17 00:00:00 2001 From: Zack Piispanen Date: Sun, 20 Oct 2013 06:55:59 -0400 Subject: [PATCH] Plugin info added --- MultiServerChat/MultiServerChat.cs | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) 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"]))