diff options
author | Haru <haru@dotalux.com> | 2015-08-11 01:57:27 +0200 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2015-08-13 17:16:27 +0200 |
commit | 3a8941f10d86563b9e881519846012e23299a45f (patch) | |
tree | da83931ac59905fa8b60c37a333295adff5155b1 /src/common | |
parent | 50cacd3089a6d1f349837b1b80e8bd4f20d2c3c2 (diff) | |
download | hercules-3a8941f10d86563b9e881519846012e23299a45f.tar.gz hercules-3a8941f10d86563b9e881519846012e23299a45f.tar.bz2 hercules-3a8941f10d86563b9e881519846012e23299a45f.tar.xz hercules-3a8941f10d86563b9e881519846012e23299a45f.zip |
Moved sql_handle into the HPMi interface
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/HPM.c | 8 | ||||
-rw-r--r-- | src/common/HPMi.h | 3 |
2 files changed, 2 insertions, 9 deletions
diff --git a/src/common/HPM.c b/src/common/HPM.c index b4594d1ca..8963630b1 100644 --- a/src/common/HPM.c +++ b/src/common/HPM.c @@ -102,7 +102,6 @@ struct hplugin *hplugin_load(const char* filename) { struct HPMi_interface **HPMi; bool anyEvent = false; void **import_symbol_ref; - Sql **sql_handle; int *HPMDataCheckVer; unsigned int *HPMDataCheckLen; struct s_HPMDataCheck *HPMDataCheck; @@ -146,13 +145,6 @@ struct hplugin *hplugin_load(const char* filename) { *import_symbol_ref = HPM->import_symbol; - if( !( sql_handle = plugin_import(plugin->dll, "mysql_handle",Sql **) ) ) { - ShowFatalError("HPM:plugin_load: failed to retrieve 'mysql_handle' for '"CL_WHITE"%s"CL_RESET"'!\n", filename); - exit(EXIT_FAILURE); - } - - *sql_handle = HPM->import_symbol("sql_handle",plugin->idx); - if( !( HPMi = plugin_import(plugin->dll, "HPMi",struct HPMi_interface **) ) ) { ShowFatalError("HPM:plugin_load: failed to retrieve 'HPMi' for '"CL_WHITE"%s"CL_RESET"'!\n", filename); exit(EXIT_FAILURE); diff --git a/src/common/HPMi.h b/src/common/HPMi.h index 244a9e0ab..5f677cce3 100644 --- a/src/common/HPMi.h +++ b/src/common/HPMi.h @@ -211,12 +211,13 @@ struct HPMi_interface { bool (*addConf) (unsigned int pluginID, enum HPluginConfType type, char *name, void (*func) (const char *val)); /* pc group permission */ void (*addPCGPermission) (unsigned int pluginID, char *name, unsigned int *mask); + + Sql *sql_handle; }; #ifndef HERCULES_CORE HPExport struct HPMi_interface HPMi_s; HPExport struct HPMi_interface *HPMi; HPExport void *(*import_symbol) (char *name, unsigned int pID); -HPExport Sql *mysql_handle; #define HPM_SYMBOL(n, s) ((s) = import_symbol((n),HPMi->pid)) #endif // !HERCULES_CORE |