コード例 #1
0
ファイル: SCPDiscord.cs プロジェクト: SandeQ/SCPDiscord
 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." });
     }
 }
コード例 #2
0
ファイル: SCPDiscord.cs プロジェクト: SandeQ/SCPDiscord
            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." });
            }
コード例 #3
0
 public override void OnDisable()
 {
     shutdown = true;
     NetworkSystem.Disconnect();
     this.Info("SCPDiscord disabled.");
 }