public string[] OnCall(ICommandSender sender, string[] args) { if (NetworkSystem.IsConnected()) { NetworkSystem.Disconnect(); return(new string[] { "Connection closed, reconnecting will begin shortly." }); } else { return(new string[] { "Connection was already closed, reconnecting is in progress." }); } }
public string[] OnCall(ICommandSender sender, string[] args) { plugin.Info("Reloading plugin..."); Config.Reload(plugin); plugin.Info("Successfully loaded config '" + plugin.GetConfigString("scpdiscord_config") + "'."); Language.Reload(); plugin.roleSync.Reload(); if (NetworkSystem.IsConnected()) { NetworkSystem.Disconnect(); } return(new string[] { "Reload complete." }); }
public override void OnDisable() { shutdown = true; NetworkSystem.Disconnect(); this.Info("SCPDiscord disabled."); }