Ejemplo n.º 1
0
        void OnInitialize(EventArgs e)
        {
            IRCCommands.Initialize();
            Commands.ChatCommands.Add(new Command("tshockirc.manage", IRCReload, "ircreload"));
            Commands.ChatCommands.Add(new Command("tshockirc.manage", IRCRestart, "ircrestart"));

            string configPath = Path.Combine(TShock.SavePath, "tshockircconfig.json");
            (Config = Config.Read(configPath)).Write(configPath);

            Connect();
        }
Ejemplo n.º 2
0
 void IRCReload(CommandArgs e)
 {
     string configPath = Path.Combine(TShock.SavePath, "tshockircconfig.json");
     (Config = Config.Read(configPath)).Write(configPath);
     e.Player.SendSuccessMessage("Reloaded IRC config!");
 }