summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorPiotr HaƂaczkiewicz <piotr.halaczkiewicz@gmail.com>2013-07-24 12:41:50 +0200
committerPiotr HaƂaczkiewicz <piotr.halaczkiewicz@gmail.com>2013-07-29 21:51:08 +0200
commite7750ecfff5bf856ecc9f38ea327c6b6cc535761 (patch)
tree163859983acdced47483f0d4fb480377da5b5be2 /src/common
parent640c66779d8da4baa8af6bd0fee2583ec2b6143c (diff)
downloadhercules-e7750ecfff5bf856ecc9f38ea327c6b6cc535761.tar.gz
hercules-e7750ecfff5bf856ecc9f38ea327c6b6cc535761.tar.bz2
hercules-e7750ecfff5bf856ecc9f38ea327c6b6cc535761.tar.xz
hercules-e7750ecfff5bf856ecc9f38ea327c6b6cc535761.zip
Permission cache overhaul
* Reworked group permission caching in session data (follow-up to cd45c30ab2dcc44bfbfac283d15bb09b3d4644bc) * Removed duplicated information from session data in favor of direct pointer to group settings. * Added getters for all group data required to process permissions and related stuff. * Added new functions to PC interface and updated calls everywhere. * Extracted function to set new group for a player (used at login, group config reload, manual adjustment of group). * Moved command permission config parsing to atcommand module. * Improved dummy map session handling. * Since it's required for all map sessions to have a valid group, dummy sessions are now created by a designated function. * Updated related code that uses dummy sessions (console `gm use` and script `atcommand`, `useatcmd`). * Various minor improvements and cleanups. * Eliminated some global variables related to loading atcommand permissions for group by passing them directly to function. * Moved definition of global array holding PC permission names from header file to source file. * Streamlined destuction of atcommands database to use DBApply helper function instead of DBIterator. * Replaced hardcoded position of console dummy session with defines from mapindex.h (thx Haruna for pointing it out). * Removed fixed length restriction on group names.
Diffstat (limited to 'src/common')
-rw-r--r--src/common/conf.c2
-rw-r--r--src/common/conf.h2
-rw-r--r--src/common/showmsg.c2
-rw-r--r--src/common/showmsg.h2
4 files changed, 4 insertions, 4 deletions
diff --git a/src/common/conf.c b/src/common/conf.c
index 3057bd4dc..6802f728b 100644
--- a/src/common/conf.c
+++ b/src/common/conf.c
@@ -2,7 +2,7 @@
// For more information, see LICENCE in the main folder
#include "conf.h"
-#include "libconfig.h"
+#include "../../3rdparty/libconfig/libconfig.h"
#include "../common/showmsg.h" // ShowError
diff --git a/src/common/conf.h b/src/common/conf.h
index 666853ba6..d223505db 100644
--- a/src/common/conf.h
+++ b/src/common/conf.h
@@ -5,7 +5,7 @@
#define _CONF_H_
#include "../common/cbasetypes.h"
-#include "libconfig.h"
+#include "../../3rdparty/libconfig/libconfig.h"
int conf_read_file(config_t *config, const char *config_filename);
int config_setting_copy(config_setting_t *parent, const config_setting_t *src);
diff --git a/src/common/showmsg.c b/src/common/showmsg.c
index 2a3146d35..9e0f63003 100644
--- a/src/common/showmsg.c
+++ b/src/common/showmsg.c
@@ -13,7 +13,7 @@
#include <time.h>
#include <stdlib.h> // atexit
-#include "libconfig.h"
+#include "../../3rdparty/libconfig/libconfig.h"
#ifdef WIN32
#include "../common/winapi.h"
diff --git a/src/common/showmsg.h b/src/common/showmsg.h
index a88985770..59a0d9538 100644
--- a/src/common/showmsg.h
+++ b/src/common/showmsg.h
@@ -6,7 +6,7 @@
#define _SHOWMSG_H_
#ifndef _HPMi_H_
- #include "libconfig.h"
+ #include "../../3rdparty/libconfig/libconfig.h"
#endif
// for help with the console colors look here:
// http://www.edoceo.com/liberum/?doc=printf-with-color