/// <summary>Executes the command.</summary> /// <param name="sender">Sender of the command.</param> /// <param name="bridge">The system to script bridge.</param> /// <param name="command">The full command requested.</param> public override void Execute(IController sender, ISystemToScriptBridge bridge, ICommand command) { string name = new MudEngineAttributes().MudName; string duration = CalculateDuration(bridge.ServerManager.StartTime); string output = string.Format("{0} has been running for {1}.", name, duration); sender.Write(output); }
/// <summary>Executes the command.</summary> /// <param name="sender">Sender of the command.</param> /// <param name="bridge">The system to script bridge.</param> /// <param name="command">The full command requested.</param> public override void Execute(IController sender, ISystemToScriptBridge bridge, ICommand command) { string version = this.GetType().Assembly.GetName().Version.ToString(); string name = new MudEngineAttributes().MudName; string output = string.Format("{0} is running version {1} of the WheelMUD Engine.", name, version); sender.Write(output); }
/// <summary>Executes the command.</summary> /// <param name="sender">Sender of the command.</param> /// <param name="bridge">The system to script bridge.</param> /// <param name="command">The full command requested.</param> public override void Execute(IController sender, ISystemToScriptBridge bridge, ICommand command) { string version = this.GetType().Assembly.GetName().Version.ToString(); string name = new MudEngineAttributes().MudName; string output = string.Format("{0} is running version {1} of the WheelMUD Engine.", name, version); sender.Write(output); }
/// <summary>Executes the command.</summary> /// <param name="sender">Sender of the command.</param> /// <param name="bridge">The system to script bridge.</param> /// <param name="command">The full command requested.</param> public override void Execute(IController sender, ISystemToScriptBridge bridge, ICommand command) { string name = new MudEngineAttributes().MudName; string duration = CalculateDuration(bridge.ServerManager.StartTime); string output = string.Format("{0} has been running for {1}.", name, duration); sender.Write(output); }
/// <summary>Checks against the guards for the command.</summary> /// <param name="sender">Sender of the command.</param> /// <param name="bridge">The system to script bridge.</param> /// <param name="command">The full command requested.</param> /// <returns>A string with the error message for the user upon guard failure, else null.</returns> public override string Guards(IController sender, ISystemToScriptBridge bridge, ICommand command) { string commonFailure = VerifyCommonGuards(sender, bridge, command, commonGuards); if (commonFailure != null) { return commonFailure; } return null; }
/// <summary>Checks against the guards for the command.</summary> /// <param name="sender">Sender of the command.</param> /// <param name="bridge">The system to script bridge.</param> /// <param name="command">The full command requested.</param> /// <returns>A string with the error message for the user upon guard failure, else null.</returns> public override string Guards(IController sender, ISystemToScriptBridge bridge, ICommand command) { string commonFailure = VerifyCommonGuards(sender, bridge, command, commonGuards); if (commonFailure != null) { return(commonFailure); } return(null); }
/// <summary>Executes the command.</summary> /// <param name="sender">Sender of the command.</param> /// <param name="bridge">The system to script bridge.</param> /// <param name="command">The full command requested.</param> public override void Execute(IController sender, ISystemToScriptBridge bridge, ICommand command) { ISession session = (ISession)sender; if (session.Connection.OutputBuffer.HasMoreData) { session.Connection.ProcessBuffer(BufferDirection.Forward); } else { sender.Write("There is no more data"); } }
/// <summary>Executes the command.</summary> /// <param name="sender">Sender of the command.</param> /// <param name="bridge">The system to script bridge.</param> /// <param name="command">The full command requested.</param> public override void Execute(IController sender, ISystemToScriptBridge bridge, ICommand command) { ISession session = (ISession) sender; if (session.Connection.OutputBuffer.HasMoreData) { session.Connection.ProcessBuffer(BufferDirection.Forward); } else { sender.Write("There is no more data"); } }