Sign in to follow this  
Gepard

r15572: New GM, Commands & Permissions system

Recommended Posts

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()

Share this post


Link to post
Share on other sites

What's the difference?

  • commands settings — what commands can group members use
  • permissions settings — what other permissions group members have

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Good job dude ! I loved the new structure of config files. Congratulations.

Share this post


Link to post
Share on other sites

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!

Share this post


Link to post
Share on other sites

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 ;)

  • Upvote 1

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

  • Upvote 1

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

ppl are having issues already with CP /lv

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 /hmm

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 by EvilPuncker

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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!

  • Upvote 1

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Those of you getting that gcc error, re-run configure script ( ./configure )

Share this post


Link to post
Share on other sites

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 by Xantara
Updated link
  • Upvote 5

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this