Exemplo n.º 1
0
 public static bool HandleCommandNoPlvl(BaseClient client, string cmdLine)
 {
     try
     {
         string[]    array       = CommandMgr.ParseCmdLine(cmdLine);
         GameCommand gameCommand = CommandMgr.GuessCommand(array[0]);
         if (gameCommand == null)
         {
             return(false);
         }
         CommandMgr.ExecuteCommand(client, gameCommand, array);
     }
     catch (Exception exception)
     {
         if (CommandMgr.log.IsErrorEnabled)
         {
             CommandMgr.log.Error("HandleCommandNoPlvl", exception);
         }
     }
     return(true);
 }
Exemplo n.º 2
0
        public static bool HandleCommandNoPlvl(BaseClient client, string cmdLine)
        {
            bool result;

            try
            {
                string[]    pars      = CommandMgr.ParseCmdLine(cmdLine);
                GameCommand myCommand = CommandMgr.GuessCommand(pars[0]);
                if (myCommand == null)
                {
                    result = false;
                    return(result);
                }
                CommandMgr.ExecuteCommand(client, myCommand, pars);
            }
            catch (Exception e)
            {
                CommandMgr.log.Error("HandleCommandNoPlvl", e);
            }
            result = true;
            return(result);
        }