public UAReturn Execute(CommandRequest cmd)
        {
            UAReturn      r;
            ServerCommand srvCMD = new ServerCommand(_userSession.DefaultDispatcher, "", cmd.CommandSyntax);

            srvCMD.Execute();
            return(srvCMD.Result);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Adds a available server command.
 /// </summary>
 public void AddAvailableServerCommand(ServerCommand Command)
 {
     if (this.GameMode.IsConnected)
     {
         this.AvailableServerCommands.Add(Command.Id = ++this.Seed, Command);
         this.GameMode.Listener.SendMessage(new AvailableServerCommandMessage(Command));
     }
     else
     {
         Command.Execute(this.GameMode);
     }
 }
Exemplo n.º 3
0
 internal void AddCommand(ServerCommand Command)
 {
     if (Command.IsServerCommand)
     {
         if (this.Level.GameMode.Connected)
         {
             this.ServerCommands.Add(Command.Id = Interlocked.Increment(ref this.NextServerCommandId), Command);
             new AvailableServerCommandMessage(this.Level.GameMode.Device)
             {
                 Command = Command
             }.Send();
         }
         else
         {
             Command.Execute();
         }
     }
     else
     {
         Logging.Info(this.GetType(), "AddCommand() - Command is not a server command.");
     }
 }
Exemplo n.º 4
0
        private static void ProcessSocketCommand(string command)
        {
            var cmdObj = new ServerCommand(command);

            cmdObj.Execute(_channels);
        }