muddesigner/MudEngine/Commands/CommandExit.cs
u8sand_cp 7f39821216 - Fixed server
- Works for multiplayer now, exit doesn't shut down everything.
- Less memory usage.
- TODO: If startup message, handle it.
2010-07-30 16:41:54 -07:00

28 lines
719 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MudEngine.GameObjects.Characters;
using MudEngine.GameManagement;
using MudEngine.Commands;
using MudEngine.GameObjects.Environment;
namespace MudEngine.Commands
{
public class CommandExit : IGameCommand
{
public bool Override { get; set; }
public string Name { get; set; }
public CommandResults Execute(string command, BaseCharacter player)
{
if (player.ActiveGame.IsMultiplayer)
player.Disconnect();
else
player.ActiveGame.Shutdown();
return new CommandResults();
}
}
}