Fixed double login bug, added gm permissions, added checks to gm commands, update your postgresql db

This commit is contained in:
Light2
2013-12-14 22:14:45 +01:00
parent 5fd06f87c1
commit 6daca0347c
11 changed files with 59 additions and 15 deletions
+12
View File
@@ -95,6 +95,9 @@ public class CommandService implements INetworkDispatch {
System.out.println("NULL Object");
return;
}
if(command.isGmCommand() && !client.isGM())
return;
CreatureObject actor = (CreatureObject) client.getParent();
@@ -131,6 +134,15 @@ public class CommandService implements INetworkDispatch {
}
public BaseSWGCommand registerGmCommand(String name) {
BaseSWGCommand command = new BaseSWGCommand(name.toLowerCase());
command.setGmCommand(true);
commandLookup.add(command);
return command;
}
public void registerAlias(String name, String target) {
Vector<BaseSWGCommand> commands = new Vector<BaseSWGCommand>(commandLookup); // copy for thread safety
BaseSWGCommand targetCommand = null;