コード例 #1
0
        public static void Exit(bool restarting, string msg)
        {
            Player[] players = PlayerInfo.Online.Items;
            foreach (Player p in players)
            {
                p.save();
            }
            foreach (Player p in players)
            {
                p.Leave(msg);
            }

            if (APIServer != null)
            {
                APIServer.Stop();
            }
            if (InfoServer != null)
            {
                InfoServer.Stop();
            }

            Player.connections.ForEach(p => p.Leave(msg));
            Plugin.Unload();
            if (listen != null)
            {
                listen.Close();
            }
            try {
                IRC.Disconnect(restarting ? "Server is restarting." : "Server is shutting down.");
            } catch {
            }
        }
コード例 #2
0
 public void Disconnect()
 {
     IRC?.Disconnect();
     IRC?.Dispose();
 }