From: Jo S. <int...@us...> - 2006-06-17 22:10:17
|
Update of /cvsroot/arianne/stendhal/src/games/stendhal/server/actions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26686/src/games/stendhal/server/actions Modified Files: AdministrationAction.java Log Message: Added function in AdministrationAction to set required admin level of commands from outside classes. Moved setting the required level for script command to constructor of StendhalGroovyRunner. Index: AdministrationAction.java =================================================================== RCS file: /cvsroot/arianne/stendhal/src/games/stendhal/server/actions/AdministrationAction.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** AdministrationAction.java 17 Jun 2006 17:56:48 -0000 1.3 --- AdministrationAction.java 17 Jun 2006 22:10:09 -0000 1.4 *************** *** 78,85 **** REQUIRED_ADMIN_LEVELS.put("summonat", 800); REQUIRED_ADMIN_LEVELS.put("alter", 900); - REQUIRED_ADMIN_LEVELS.put("script", 1000); REQUIRED_ADMIN_LEVELS.put("super", 5000); } public static boolean isPlayerAllowedToExecuteAdminCommand(Player player, String command, boolean verbose) { // get adminlevel of player and required adminlevel for this command --- 78,88 ---- REQUIRED_ADMIN_LEVELS.put("summonat", 800); REQUIRED_ADMIN_LEVELS.put("alter", 900); REQUIRED_ADMIN_LEVELS.put("super", 5000); } + public static void registerCommandLevel (String command, int minLevel) { + REQUIRED_ADMIN_LEVELS.put(command, minLevel); + } + public static boolean isPlayerAllowedToExecuteAdminCommand(Player player, String command, boolean verbose) { // get adminlevel of player and required adminlevel for this command |