Exemple #1
0
        /// <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);
        }
Exemple #2
0
        /// <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);
        }
Exemple #3
0
        /// <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);
        }
Exemple #4
0
        /// <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);
        }
Exemple #5
0
        /// <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;
        }
Exemple #6
0
        /// <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);
        }
Exemple #7
0
        /// <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");
            }
        }
Exemple #8
0
        /// <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");
            }
        }