Time for more detailed description of changes I've done so far.
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.
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, the same that is used in `login`.`group_id`
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
[*]Groups are configured in 'conf/groups.conf' file.
[*]Each account belongs to exactly one group. In `login` table, `level` column has been renamed to `group_id`.
[*]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.
[*]Atcommand configuration file no longer defines GM levels required to use the command. Permissions to use commands are defined for each player group separately in group configuration file.
[*]GM configuration file (conf/battle/gm.conf) no longer defines GM levels required to get some privileges (like trading or partying). See full list:
These permissions are defined for each player group separately in group configuration file.
[*]Player title defined by 'conf/battle/gm.conf' settings "title_lvl1" to "title_lvl8" and 'conf/msg_athena.conf' (335~342) are replaced with group names.
[*]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
[*]Modified GM whisper system to deliver messages basing on permissions, not level.
[*]Remote trade request is now possible only if player is allowed to use @trade command as well.
[*]Added a proper permission to use /changemaptype command.
[*]clif_displaymessage is now capable of displaying multiline messages
[*]all ACMD_FUNCs are static now, and the only way to invoke them is with is_atcommand(); all client commands (starting with /) are now translated into corresponding atcommands (with exception of /kick used on monster, as there is no atcommand to kill single monster). List of commands:
[*]Removed nonsense "bot check" triggering when player blocked (/ex) Server.
[*]Merged @monster, @monsterbig and @monstersmall.
[*]Removed @adjcmdlvl command.
[*]Replaced @adjgmlvl command with @adjgroup, which allows to temporarily move player to another group.
[*]@help command requires "commandname" param and shows more detailed info about commands.
Technical details:
All occurences of GM level have been replaced either with Group ID (in login and char-server) or Group Level (in map-server). Login-server and char-server are not aware of player groups, they just know the group_id of the account. In map-server group level is used only if there is a need to compare "level" of two players (to preserve the rule that low-level GM can not use commands like @kick on high-level GM), and in script command getgmlevel(). [*]Player groups implementation
Player groups are implemented in separate source file and only provide functions to: check if group can use command
check if group has permission to do something
get group name
get group level
initialize groups (for server startup)
finalize groups (for server shutdown)
[*]Player groups use libconfig to load configuration from config file to memory.
group permissions are cached and packed in one unsigned int to faster lookup
group allowed commands are looked up by name by libconfig API directly from configuration struct
inheritance rules are evaluated once, at config load; there is a simple check against inheritance cycles
[*]Atcommand changes
atcommands use libconfig to load configuration from config file to memory
atcommand aliases now use a separate DBMap that points to the same AtCommandInfo structs as original commands
[*]"GM" permissions ("can trade", "can party" etc) are defined as enum now.
If you're interested in even more details, just ask or wait until I post a diff, which should be ready soon.
I need however an opinion on libconfig. It looks like libconfig package for Debian (dunno about other distros) has not been updated in a while, so users will have to compile it from source anyway. So maybe it's better to just link it statically in both Linux and Windows? It's LGPL, so we can include its code in rAthena and change it to GPL.