예제 #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();
        }
예제 #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!");
 }