Examples of IAdminCommandHandler


Examples of com.l2jfrozen.gameserver.handler.IAdminCommandHandler

        else
        {
          command = _command;
        }

        IAdminCommandHandler ach = AdminCommandHandler.getInstance().getAdminCommandHandler(command);

        if(ach == null)
        {
          if(activeChar.isGM())
          {
            activeChar.sendMessage("The command " + command + " does not exists!");
          }

          _log.warning("No handler registered for admin command '" + command + "'");
          return;
        }

        if(!AdminCommandAccessRights.getInstance().hasAccess(command, activeChar.getAccessLevel()))
        {
          activeChar.sendMessage("You don't have the access right to use this command!");
          if(Config.DEBUG)
          {
            _log.warning("Character " + activeChar.getName() + " tried to use admin command " + command + ", but doesn't have access to it!");
          }
          return;
        }

        if(Config.GMAUDIT)
        {
          GMAudit.auditGMAction(activeChar.getName()+" ["+activeChar.getObjectId()+"]", command, (activeChar.getTarget() != null?activeChar.getTarget().getName():"no-target"),_command.replace(command, ""));
         
        }

        ach.useAdminCommand(_command, activeChar);
      }
      else if(_command.equals("come_here") && activeChar.isGM())
      {
        comeHere(activeChar);
      }
View Full Code Here

Examples of com.l2jfrozen.gameserver.handler.IAdminCommandHandler

      _log.log(Level.WARNING, "Character " + activeChar.getName() + " tried to use admin command " + _command + ", but doesn't have access to it!");
      return;
    }

    //gets the Handler of That Commmand
    IAdminCommandHandler ach = AdminCommandHandler.getInstance().getAdminCommandHandler(_command);

    //if handler is valid we Audit and use else we notify in console.
    if(ach != null)
    {
      if(Config.GMAUDIT)
      {
        GMAudit.auditGMAction(activeChar.getName()+" ["+activeChar.getObjectId()+"]", _command, (activeChar.getTarget() != null?activeChar.getTarget().getName():"no-target"));
       
      }
     
      ach.useAdminCommand(_command, activeChar);
    }
    else
    {
      activeChar.sendMessage("The command " + _command + " doesn't exists!");
      _log.log(Level.WARNING, "No handler registered for admin command '" + _command + "'");
View Full Code Here

Examples of l2p.gameserver.handler.IAdminCommandHandler

      case admin_dump_commands:
        out = "Commands list:\r\n";
        HashMap<IAdminCommandHandler, TreeSet<String>> handlers = new HashMap<IAdminCommandHandler, TreeSet<String>>();
        for(String cmd : AdminCommandHandler.getInstance().getAllCommands())
        {
          IAdminCommandHandler key = AdminCommandHandler.getInstance().getAdminCommandHandler(cmd);
          if(!handlers.containsKey(key))
          {
            handlers.put(key, new TreeSet<String>(Collator.getInstance()));
          }
          handlers.get(key).add(cmd.replaceFirst("admin_", ""));
        }
        for(IAdminCommandHandler key : handlers.keySet())
        {
          out += "\r\n\t************** Group: " + key.getClass().getSimpleName().replaceFirst("Admin", "") + " **************\r\n";
          for(String cmd : handlers.get(key))
          {
            out += "//" + cmd + " - \r\n";
          }
        }
View Full Code Here

Examples of net.sf.l2j.gameserver.handler.IAdminCommandHandler

        {
          Util.handleIllegalPlayerAction(activeChar,"Warning!! Non-gm character "+activeChar.getName()+" requests gm bypass handler, hack?", Config.DEFAULT_PUNISH);
          return;
        }

    IAdminCommandHandler ach = AdminCommandHandler.getInstance().getAdminCommandHandler("admin_"+_command);

    if (ach != null)
    {
      ach.useAdminCommand("admin_"+_command, activeChar);
    }
  }
View Full Code Here

Examples of net.sf.l2j.gameserver.handler.IAdminCommandHandler

                {
                    _log.info("<GM>" + activeChar + " does not have sufficient privileges for command '" + _command + "'.");
                    return;
                }

        IAdminCommandHandler ach = AdminCommandHandler.getInstance().getAdminCommandHandler(_command);

        if (ach != null)
          ach.useAdminCommand(_command, activeChar);
        else
          _log.warning("No handler registered for bypass '"+_command+"'");
      }
      else if (_command.equals("come_here") && activeChar.getAccessLevel() >= Config.GM_ACCESSLEVEL)
      {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.