Popular Post Gepard Posted February 13, 2012 Popular Post Posted February 13, 2012 New GM, Commands & Permissions system has been added in r15572. Unfortunately, this update is not backwards compatible with previous revisions and requires reconfiguration of existing rAthena installations. This new approach is designed for easy maintenance, increased flexibility and readability. Hopefully it will make up for migration difficulties. General description The whole concept of GMs and non-GMs as well as GM levels has been abondoned in favor of more role- and privilege-oriented player groups. Each account belongs to exactly one group. Player groups are independent of each other, so unless you decide to do so, they don't have to share any privileges like it was with top-down GM level hierarchy. There is, however, a way to say which group is higher, and which is lower: it's group level. Each group has following atributes: ID — unique number name level — it can be interpereted as (GM) level of all group members commands settings — what commands can group members use permissions settings — what other permissions group members have inherited groups — permissions and commands from which groups are inherited log commands — should commands issued by this group be logged or not Groups are configured in conf/groups.conf file. The file itself is fully documented and contains default configuration that should be adjusted to your needs. Details Column `login`.`gmlevel` has been renamed to `group_id`. It now stores ID of the group player belongs to, so you need update your database accordingly. Atcommand configuration file conf/atcommand_athena.conf no longer defines GM levels required to use the command. Permissions to use commands are now defined for each player group separately in group configuration file conf/groups.conf. Command aliases are still being defined in conf/atcommand_athena.conf. File syntax has changed. Import is no longer supported for this file. File is fully documented and contains default aliases that were present in previous revisions. GM configuration file conf/battle/gm.conf no longer defines GM levels required to get some privileges (like trading or partying). See full list of removed settings: lowest_gm_level, atcommand_gm_only, gm_all_skill, gm_all_equipment, gm_skill_unconditional, gm_join_chat, gm_kick_chat, gm_can_party, gm_cant_party_min_lv, gm_cant_drop_min_lv, gm_cant_drop_max_lv, disp_hpmeter, hack_info_GM_level, any_warp_GM_min_level, who_display_aid, gm_viewequip_min_lv, gm_check_minlevel These permissions are now defined for each player group separately in group configuration file conf/groups.conf. Player titles defined by conf/battle/gm.conf settings title_lvl1 to title_lvl8 and conf/msg_athena.conf (335~342) are replaced with group names. Removed @adjcmdlvl command. Replaced @adjgmlvl command with @adjgroup, which allows to temporarily (until relog) move player to another group. In login-server configuration file conf/login_athena.conf min_level_to_connect setting has been replaced with group_id_to_connect setting, which allows you to define account group id that is required to connect to server. In char-server configuration file conf/char_athena.conf gm_allow_level setting has been replaced with gm_allow_group setting, which allows you to define group id that is allowed to bypass the server limit of online users. In log configuration file conf/log_athena.conf log_gm setting has been replaced with log_commands setting, which allows you to decide whether commands should be logged or not. Even with command logging enabled, only commands issued by groups that have log_commands set to true will be logged. About group level Group level is used only: when determining if player can override trade restrictions defined in db/item_trade.txt when determining if player can use @command on another player (existing rule that low-level player can not use some commands, eg @kick on high-level player has been kept) or see another player with @who commands (if they have "hide_session" privilege). as a return value for getgmlevel() script command when determining if player can use commands in a map with nocommand mapflag set Other CMakeLists were not updated. If you know cmake and want to contribute, just send me (or other dev) a diff. There were multiple minor changes in this revision. For full list, see rAthena Trac (r15572) or SVN log. 15
EvilPuncker Posted February 13, 2012 Posted February 13, 2012 very nice and flexible, btw what about a new alias to the getgmlevel() command, because seems like that is the only thing that "remained" from that update I know that changing it would give some headache to some users, but creating an alias would be a nice idea, like getgroupid()
xXAkatsukiUchihaXx Posted February 13, 2012 Posted February 13, 2012 What's the difference? commands settings — what commands can group members use permissions settings — what other permissions group members have
EvilPuncker Posted February 13, 2012 Posted February 13, 2012 What's the difference? commands settings — what commands can group members use permissions settings — what other permissions group members have well, commands are commands, and permissions are those old settings i think: lowest_gm_level, atcommand_gm_only, gm_all_skill, gm_all_equipment, gm_skill_unconditional, gm_join_chat, gm_kick_chat, gm_can_party, gm_cant_party_min_lv, gm_cant_drop_min_lv, gm_cant_drop_max_lv, disp_hpmeter, hack_info_GM_level, any_warp_GM_min_level, who_display_aid, gm_viewequip_min_lv, gm_check_minlevel
Matheus Posted February 13, 2012 Posted February 13, 2012 Good job dude ! I loved the new structure of config files. Congratulations.
simplynice Posted February 13, 2012 Posted February 13, 2012 is this required to be patched in our server?
Gepard Posted February 13, 2012 Author Posted February 13, 2012 very nice and flexible, btw what about a new alias to the getgmlevel() command, because seems like that is the only thing that "remained" from that update I know that changing it would give some headache to some users, but creating an alias would be a nice idea, like getgroupid() getgmlevel() will be kept as is to provide some backwards compatibility with existing scripts. And I totally forgot about getgroupid(). I'll add it later today. What's the difference? commands settings — what commands can group members use permissions settings — what other permissions group members have It's like EvilPuncker explained. Please read conf/groups.conf, doc/atcommands.txt and doc/permissions.txt for a detailed explanation. Good job dude ! I loved the new structure of config files. Congratulations. Thanks! is this required to be patched in our server? It is not required to update now, since it is not a security patch. This update adds a new feature, while (partially) removing old one. I recommend you familiarize yourself with new configuration files, test your new configuration on a test server and only then update your production server. And remember: backup first!
Wildcard Posted February 13, 2012 Posted February 13, 2012 Good changes, but may I suggest adopting the import-tmpl/import logic for this file as well, since if one file violates the concept, it's pretty much moot 1
Mr. No One Posted February 13, 2012 Posted February 13, 2012 How should I compile? It fails with a bunch of libconfig related output on OSX Server 10.5. I had no issues with compiling before. gcc -g -O2 -pipe -ffast-math -Wall -Wno-sign-compare -Wno-unused-parameter -Wno-pointer-sign -Wno-switch -shared -fPIC -fno-strict-aliasing -DHAVE_SETRLIMIT -DHAVE_USELOCALE -DHAVE_NEWLOCALE -DHAVE_FREELOCALE -Wno-unused -Wno-parentheses -L/usr/lib -I../common -I/usr/include -c -o libconfig.o libconfig.c libconfig.c: In function ‘__config_locale_override’: libconfig.c:89: error: ‘locale_t’ undeclared (first use in this function) libconfig.c:89: error: (Each undeclared identifier is reported only once libconfig.c:89: error: for each function it appears in.) libconfig.c:89: error: syntax error before ‘loc’ libconfig.c:90: warning: implicit declaration of function ‘uselocale’ libconfig.c:90: error: ‘loc’ undeclared (first use in this function) libconfig.c: In function ‘__config_locale_restore’: libconfig.c:115: error: ‘locale_t’ undeclared (first use in this function) libconfig.c:115: error: syntax error before ‘loc’ libconfig.c:116: warning: implicit declaration of function ‘freelocale’ libconfig.c:116: error: ‘loc’ undeclared (first use in this function) make[1]: *** [libconfig.o] Error 1 make: *** [libconfig] Error 2
Gepard Posted February 13, 2012 Author Posted February 13, 2012 Good changes, but may I suggest adopting the import-tmpl/import logic for this file as well, since if one file violates the concept, it's pretty much moot Thank you for your suggestion. Libconfig which is the library used to parse these new, more complex configuration files does not allow to duplicate settings. I'm going to extend it so it would be able to merge default and imported settings. How should I compile? It fails with a bunch of libconfig related output on OSX Server 10.5. I had no issues with compiling before. I'm sorry, I don't have OSX to test. I suppose it might be xlocale.h not being detected, so please try with this configure script: http://pastebin.com/VSLLdPv5 If it works, I'll commit it to SVN. 1
Mr. No One Posted February 13, 2012 Posted February 13, 2012 I'm sorry, I don't have OSX to test. I suppose it might be xlocale.h not being detected, so please try with this configure script: http://pastebin.com/VSLLdPv5 If it works, I'll commit it to SVN. Success, I got the executables, thank you! Looking forward to give a try to your work, I'll set up a testing environment asap.
ngek202 Posted February 13, 2012 Posted February 13, 2012 this new system is really nice more organized just one question setting a permission/command to false won't work unless if you delete the entry or state it as a comment? ex: all_skill: false
Gepard Posted February 13, 2012 Author Posted February 13, 2012 All commands/permissions are disabled (false) as default. So no need to disable them manually. You might want to disable some inherited commands/permissions though, and then setting: false is useful.
netBug Posted February 13, 2012 Posted February 13, 2012 Im getting this when i make sql in linux libconfig.c: In function ‘__config_locale_override’: libconfig.c:94: error: ‘locale_t’ undeclared (first use in this function) libconfig.c:94: error: (Each undeclared identifier is reported only once libconfig.c:94: error: for each function it appears in.) libconfig.c:94: error: expected ‘;’ before ‘loc’ libconfig.c:95: warning: implicit declaration of function ‘uselocale’ libconfig.c:95: error: ‘loc’ undeclared (first use in this function) libconfig.c: In function ‘__config_locale_restore’: libconfig.c:115: error: ‘locale_t’ undeclared (first use in this function) libconfig.c:115: error: expected ‘;’ before ‘loc’ libconfig.c:116: warning: implicit declaration of function ‘freelocale’ libconfig.c:116: error: ‘loc’ undeclared (first use in this function) make[1]: *** [libconfig.o] Error 1
Brian Posted February 14, 2012 Posted February 14, 2012 Looks like the same error as post=78414? Gepard fixed it in r15573
EvilPuncker Posted February 14, 2012 Posted February 14, 2012 ppl are having issues already with CP http://code.google.com/p/fluxcp/issues/detail?id=57
ngek202 Posted February 14, 2012 Posted February 14, 2012 ppl are having issues already with CP http://code.google.com/p/fluxcp/issues/detail?id=57 i think not only flux will have problem but even other cp's that still depend on the level column
simplynice Posted February 14, 2012 Posted February 14, 2012 ppl are having issues already with CP http://code.google.com/p/fluxcp/issues/detail?id=57 i think not only flux will have problem but even other cp's that still depend on the level column will this be handle? i'd like to update im afraid flux won't support this.
EvilPuncker Posted February 14, 2012 Posted February 14, 2012 (edited) ppl are having issues already with CP http://code.google.com/p/fluxcp/issues/detail?id=57 i think not only flux will have problem but even other cp's that still depend on the level column will this be handle? i'd like to update im afraid flux won't support this. just edit Flux/LoginServer.php accordingly, I think Edited February 14, 2012 by EvilPuncker
Lelouch vi Britannia Posted February 14, 2012 Posted February 14, 2012 hey guys i tryed rathena r15581 and i got the same error that netbug and whoeverknows got c -o libconfig.o libconfig.c libconfig.c: In function â__config_locale_overrideâ: libconfig.c:94: error: âlocale_tâ undeclared (first use in this function) libconfig.c:94: error: (Each undeclared identifier is reported only once libconfig.c:94: error: for each function it appears in.) libconfig.c:94: error: expected â;â before âlocâ libconfig.c:95: warning: implicit declaration of function âuselocaleâ libconfig.c:95: error: âlocâ undeclared (first use in this function) libconfig.c: In function â__config_locale_restoreâ: libconfig.c:115: error: âlocale_tâ undeclared (first use in this function) libconfig.c:115: error: expected â;â before âlocâ libconfig.c:116: warning: implicit declaration of function âfreelocaleâ libconfig.c:116: error: âlocâ undeclared (first use in this function) make[1]: *** [libconfig.o] Error 1
SkzBR Posted February 14, 2012 Posted February 14, 2012 Hi, Thanks for reading community suggestions. Can I suggest another improvement for this system? Can you make the group have something like extra permissions or metadata key-value pairs? So, on my custom script i can do anything like checkgroupmeta("x-custom-var") == true. So, scripters can do anything and on "script installation instructions" they can instruct users to put the permission on groups that are allowed to use script. Sorry for bad english, my keyboard is a trash! 1
m4stermind Posted February 15, 2012 Posted February 15, 2012 I tried overwriting configure.in with the script posted by Gepard and also updated my SVN to the latest, still I get this error gcc -g -O2 -pipe -ffast-math -Wall -Wno-sign-compare -Wno-unused-parameter -Wno-pointer-sign -Wno-switch -shared -fPIC -fno-strict-aliasing -DHAVE_SETRLIMIT -DHAVE_USELOCALE -DHAVE_NEWLOCALE -DHAVE_FREELOCALE -Wno-unused -Wno-parentheses -L/usr/lib -I../common -I/usr/include -c -o libconfig.o libconfig.c libconfig.c: In function ‘__config_locale_override’: libconfig.c:89: error: ‘locale_t’ undeclared (first use in this function) libconfig.c:89: error: (Each undeclared identifier is reported only once libconfig.c:89: error: for each function it appears in.) libconfig.c:89: error: syntax error before ‘loc’ libconfig.c:90: warning: implicit declaration of function ‘uselocale’ libconfig.c:90: error: ‘loc’ undeclared (first use in this function) libconfig.c: In function ‘__config_locale_restore’: libconfig.c:115: error: ‘locale_t’ undeclared (first use in this function) libconfig.c:115: error: syntax error before ‘loc’ libconfig.c:116: warning: implicit declaration of function ‘freelocale’ libconfig.c:116: error: ‘loc’ undeclared (first use in this function) make[1]: *** [libconfig.o] Error 1 make: *** [libconfig] Error 2
Ind Posted February 15, 2012 Posted February 15, 2012 Those of you getting that gcc error, re-run configure script ( ./configure )
Xantara Posted February 15, 2012 Posted February 15, 2012 (edited) For FluxCP users, here is a patch file that changes all needed instances of the 'level' field to 'group_id' : - fluxCP_rA_update_r15583.patch This is obviously unofficial so use at your own risk. Anyways, let me know if I missed any or if there are still errors. Edited July 3, 2012 by Xantara Updated link 5
Recommended Posts