diff options
author | shennetsind <ind@henn.et> | 2015-01-18 19:53:29 -0200 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2015-01-18 19:53:29 -0200 |
commit | eb75dc692321954912d3befcdfb45d2f1898eaa4 (patch) | |
tree | c3b9f799a494281031cd067c8c0fa31a5fa6b462 /src/common/HPM.h | |
parent | 43a24c0c88bdf19935d15d1b8392e3527ff090cd (diff) | |
parent | d541a74021fd7715f1201b123714253dd602d2bf (diff) | |
download | hercules-eb75dc692321954912d3befcdfb45d2f1898eaa4.tar.gz hercules-eb75dc692321954912d3befcdfb45d2f1898eaa4.tar.bz2 hercules-eb75dc692321954912d3befcdfb45d2f1898eaa4.tar.xz hercules-eb75dc692321954912d3befcdfb45d2f1898eaa4.zip |
Merge branch 'master' of github.com:HerculesWS/Hercules
Diffstat (limited to 'src/common/HPM.h')
-rw-r--r-- | src/common/HPM.h | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/src/common/HPM.h b/src/common/HPM.h index 973bc6cca..e99b0f2ae 100644 --- a/src/common/HPM.h +++ b/src/common/HPM.h @@ -82,14 +82,6 @@ struct HPMFileNameCache { char *name; }; -struct HPMArgData { - unsigned int pluginID; - char *name;/* e.g. "--my-arg","-v","--whatever" */ - void (*help) (void);/* to display when --help is used */ - void (*func) (char *param);/* NULL when no param is available */ - bool has_param;/* because of the weird "--arg<space>param" instead of the "--arg=param" */ -}; - struct HPDataOperationStorage { void **HPDataSRCPtr; unsigned int *hdatac; @@ -123,8 +115,9 @@ struct HPM_interface { /* config listen */ struct HPConfListenStorage *confs[HPCT_MAX]; unsigned int confsc[HPCT_MAX]; - /* --command-line */ - DBMap *arg_db; + /** Plugins requested through the command line */ + char **cmdline_plugins; + int cmdline_plugins_count; /* funcs */ void (*init) (void); void (*final) (void); @@ -137,16 +130,13 @@ struct HPM_interface { void *(*import_symbol) (char *name, unsigned int pID); void (*share) (void *, char *); void (*symbol_defaults) (void); - void (*config_read) (const char * const *extra_plugins, int extra_plugins_count); + void (*config_read) (void); bool (*populate) (struct hplugin *plugin,const char *filename); void (*symbol_defaults_sub) (void);//TODO drop char *(*pid2name) (unsigned int pid); unsigned char (*parse_packets) (int fd, enum HPluginPacketHookingPoints point); void (*load_sub) (struct hplugin *plugin); bool (*addhook_sub) (enum HPluginHookType type, const char *target, void *hook, unsigned int pID); - bool (*parse_arg) (const char *arg, int* index, char *argv[], bool param); - void (*arg_help) (void); - int (*arg_db_clear_sub) (DBKey key, DBData *data, va_list args); void (*grabHPData) (struct HPDataOperationStorage *ret, enum HPluginDataTypes type, void *ptr); /* for server-specific HPData e.g. map_session_data */ bool (*grabHPDataSub) (struct HPDataOperationStorage *ret, enum HPluginDataTypes type, void *ptr); @@ -158,6 +148,8 @@ struct HPM_interface { void (*datacheck_final) (void); }; +CMDLINEARG(loadplugin); + struct HPM_interface *HPM; void hpm_defaults(void); |