The current implementation is way better. It allows you to create different access levels and give them whatever command you want them to use. It's much more flexible then the old one. Updating a row on the database isn't that hard.. even my cat could do it.
Let's say you want to create a new "group" for your Great Monkeys:
Code: Select all
INSERT INTO `jeejee_db`.`access_levels` (`accessLevel`, `name`, `nameColor`, `titleColor`, `childAccess`, `isGm`, `allowPeaceAttack`, `allowFixedRes`, `allowTransaction`, `allowAltg`, `giveDamage`, `takeAggro`, `gainExp`) VALUES ('11', 'Great Monkeys', 'FFFFFF', 'FFFFFF', '', '1', '0', '0', '0', '0', '0', '0', '0');
Damn you're uber. You just created a new group. Now let's give them access to some commands:
Code: Select all
UPDATE `jeejee_db`.`admin_command_access_rights` SET `accessLevels` = '11' WHERE `admin_command_access_rights`.`adminCommand` = 'admin_kick';UPDATE `jeejee_db`.`admin_command_access_rights` SET `accessLevels` = '11' WHERE `admin_command_access_rights`.`adminCommand` = 'admin_open';UPDATE `jeejee_db`.`admin_command_access_rights` SET `accessLevels` = '11' WHERE `admin_command_access_rights`.`adminCommand` = 'admin_close';
Congratulations! Your great monkeys are now able to kick, and open/close doors.
Since you feel uber, you want to do a new group. The uber great monkeys. You want them to have the same right as the great monkey with few more commands. We'll create the uber great monkeys group.
Code: Select all
INSERT INTO `jeejee_db`.`access_levels` (`accessLevel`, `name`, `nameColor`, `titleColor`, `childAccess`, `isGm`, `allowPeaceAttack`, `allowFixedRes`, `allowTransaction`, `allowAltg`, `giveDamage`, `takeAggro`, `gainExp`) VALUES ('10', 'Uber Great Monkeys', 'FFFFFF', 'FFFFFF', '10', '1', '0', '0', '0', '0', '0', '0', '0');
As you can see, we've set the child access of UGM's to 11. (11 is the access level of the Great Monkeys). This means our UGM's will have the same right as the GM's with, in addition, the commands assigned to their level. You want to give them access to the ban command in addition:
Code: Select all
UPDATE `jeejee_db`.`admin_command_access_rights` SET `accessLevels` = '10' WHERE `admin_command_access_rights`.`adminCommand` = 'admin_ban';
You're done. That's all you needed to manage your team rights completely. Just a several querys! See... wasn't so hard.