Skip to content

Commit

Permalink
Plugin info added
Browse files Browse the repository at this point in the history
  • Loading branch information
Zack Piispanen committed Oct 20, 2013
1 parent 92b0cf7 commit 1148c42
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions MultiServerChat/MultiServerChat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand All @@ -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"]))
Expand Down

0 comments on commit 1148c42

Please sign in to comment.