* Telnet client header information is now successfully (finally) stripped out of the first stream received. * Command System underwent some optimizations along with now always returning a Boolean value once execution of a command is completed. * ICommand interface now forces all ICommand.Execute methods to return a Boolean value. * DataPaths class re-wrote and is now simi in-use by StandardGame and the Login command * Minor adjustments to how characters are initialized upon connection in various classes.
38 lines
983 B
C#
38 lines
983 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading;
|
|
|
|
using MudEngine.Core.Interface;
|
|
using MudEngine.Game;
|
|
using MudEngine.Game.Characters;
|
|
using MudEngine.Networking;
|
|
|
|
namespace MudEngine.GameScripts.Commands
|
|
{
|
|
public class CommandStop : ICommand
|
|
{
|
|
public string Name { get; set; }
|
|
|
|
public string Description { get; set; }
|
|
|
|
public List<string> Help { get; set; }
|
|
|
|
public CommandStop()
|
|
{
|
|
this.Name = "Stop";
|
|
this.Description = "Chat command that allows objects to communicate.";
|
|
}
|
|
|
|
public Boolean Execute(string command, StandardCharacter character)
|
|
{
|
|
//Grab a reference to the character for simplifying access.
|
|
StandardGame game = character.Game;
|
|
|
|
//Stop the game.
|
|
new Thread(game.Stop).Start();
|
|
return true;
|
|
}
|
|
}
|
|
}
|