Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
- Plugins were accidentally using the core's memory manager instead of
the HPM-safe wrappers.
- As a side-effect of this, plugins shall not be able to hook into the
iMalloc interface.
- The issue was introduced in e7c2f7d827ad286dc826e483391e64b8ffe2720b
Signed-off-by: Haru <haru@dotalux.com>
|
|
Signed-off-by: Haru <haru@dotalux.com>
|
|
|
|
Plugin settings should be relative to the the libconfig file root. For
example, a configuration setting of type HPCT_CHAR will be relative to
the root of conf/char/char-server.conf. In order to add a configuration
entry inside the char_configuration block, the full configuration path
(slash-delimited) should be passed to addCharConf(), as in the
following example:
`addCharConf("char_configuration/my_setting", my_parser_function);`
Signed-off-by: Haru <haru@dotalux.com>
|
|
When a setting optional, no warning is issued on the console when said setting is not found in the config
Signed-off-by: Haru <haru@dotalux.com>
|
|
Ported to modern Hercules and cleaned up from Panikon's commits: 44fea0b3cdba6901599265220228ba4359b1f96d, 9cba05bc0811e638bbaaa6cff887d0b2c9872560
Signed-off-by: Haru <haru@dotalux.com>
|
|
Signed-off-by: Haru <haru@dotalux.com>
|
|
- Plugins that want to make use of the HPMHooking must now include
"plugins/HPMHooking.h".
Signed-off-by: Haru <haru@dotalux.com>
|
|
Signed-off-by: Haru <haru@dotalux.com>
|
|
Add all missing -Wformat flags into configure.
|
|
Signed-off-by: Haru <haru@dotalux.com>
|
|
- The return value is now consistent with the libconfig standard
(CONFIG_TRUE/CONFIG_FALSE).
- Removed some redundant error messages.
Signed-off-by: Haru <haru@dotalux.com>
|
|
Now packet id will be passed to Hercules Plugin Manager instead of let it figure it on itself
|
|
Signed-off-by: Haru <haru@dotalux.com>
|
|
plugins into scripts
- Fixed Possible Crash when null parse function pointer passed to HPMi->addConf
- Now it's possible to use same parse function for all config entries
- Now Battle Config entries must have a return function
|
|
|
|
Signed-off-by: Haru <haru@dotalux.com>
|
|
- Changed the hplugin_data_store's array into a VECTOR.
Signed-off-by: Haru <haru@dotalux.com>
|
|
- Several explicit casts are removed, to have a slightly better
type-checking at compile time.
- A destructor function is provided, to remove code duplication.
Signed-off-by: Haru <haru@dotalux.com>
|
|
Signed-off-by: Haru <haru@dotalux.com>
|
|
HPM->cmdline_load_plugins
Signed-off-by: Haru <haru@dotalux.com>
|
|
Signed-off-by: Haru <haru@dotalux.com>
|
|
- This is a generic vector. It doesn't make use of the VECTOR type
because it needs to outlive the memory manager.
Signed-off-by: Haru <haru@dotalux.com>
|
|
Signed-off-by: Haru <haru@dotalux.com>
|
|
Signed-off-by: Haru <haru@dotalux.com>
|
|
Signed-off-by: Haru <haru@dotalux.com>
|
|
signed/unsigned mismatch.
|
|
- This doesn't affect the current unloading function (executed at
shutdown), but it is only related to the (upcoming) manual plugin
unloading.
Signed-off-by: Haru <haru@dotalux.com>
|
|
Signed-off-by: Haru <haru@dotalux.com>
|
|
- Special thanks to Dastgir
Signed-off-by: Haru <haru@dotalux.com>
|
|
Signed-off-by: Haru <haru@dotalux.com>
|
|
Signed-off-by: Haru <haru@dotalux.com>
|
|
Signed-off-by: Haru <haru@dotalux.com>
|
|
Signed-off-by: Haru <haru@dotalux.com>
|
|
Signed-off-by: Haru <haru@dotalux.com>
|
|
Improved compatibility, portability and standards conformance.
- Since it is not possible to portably and reliably re-use the core's
symbols in plugins, symbols are no longer exported unless explicitly
required, in the UNIX builds. This mimics the Windows behavior and
adds HPM compatibility to OSes such as FreeBSD. Credits to Andrei Karas
for making this possible.
- For convenience, it is no longer necessary to call GET_SYMBOL, since
the plugin will automatically import all the available symbols when
it's loaded, depending on the included headers.
- Plugins are now supposed to include the "common/hercules.h" header
before including anything else. Incluing common/HPMi.h,
common/cbasetypes.h or conf/core.h is no longer necessary, as those
are guaranteed to be automatically included by hercules.h.
- HPM API version bumped to 1.1.
Signed-off-by: Haru <haru@dotalux.com>
|
|
Signed-off-by: Haru <haru@dotalux.com>
|
|
- The showmsg interface is automatically imported into plugins by the
HPM (just like previously, the various Show* functions were). This
change requires no actions from plugin developers.
- stdout_with_ansisequence is now available through
showmsg->stdout_with_ansisequence
- msg_silent is now available through showmsg->silent
- console_msg_log is now available through showmsg->console_log
- timestamp_format is now available through showmsg->timestamp_format
- Plugin-safe macros are provided, so that all Show* and Clear* calls
will require no changes.
- vShowMessage is provided through the public API, as va_list variant
of ShowMessage.
- vShowMessage_ is no longer part of the public API. If necessary,
va_list variants of the other Show* functions will be added at a
later time as follow-ups.
Signed-off-by: Haru <haru@dotalux.com>
|
|
- Each loaded plugin will now show a status message
- If a plugin loads because of a missing symbol, an error message will
be displayed, mentioning the name of the missing symbol.
Signed-off-by: Haru <haru@dotalux.com>
|
|
Signed-off-by: Haru <haru@dotalux.com>
|
|
- Include directives are now directory-independent.
- This will allow building plugins from other directories in future.
Signed-off-by: Haru <haru@dotalux.com>
|
|
If you set a plugin to load and it fails for some reason, the server
will now exit. It will still warn when attempting to load a plugin
twice.
|
|
|
|
- Variable scopes reduced
- Parenthesized ambiguous expressions
- Removed or added NULL checks where (un)necessary
- Corrected format strings
- Fixed typos potentially leading to bugs
Signed-off-by: Haru <haru@dotalux.com>
|
|
- login_server, char_server, map_server as well as the tools (mapcache)
now have a common command line arguments handling mechanism.
- All of them now accept `--help` (`-h`), `--version` (`-v`) and
`--load-plugin`.
- login_server now accepts `--login-config` and `--lan-config` instead
of relying on positional arguments to override those files. The old
syntax will no longer work, please update your custom startup scripts.
- char_server now accepts `--char-config`, `--inter-config`,
`--lan-config` instead of relying on positional arguments. The old
syntax will no longer work, please update your custom startup scripts.
- mapcache now accepts `--grf-list`, `--map-list`, `--map-cache`,
`--rebuild` in place of, respectively, `-grf`, `-list`, `-cache`,
`-rebuild`.
- A new macro `CMDLINEARG()` is provided, to help defining new command
line argument handlers (i.e. in plugins). the `addArg()` call is still
required, but its syntax has changed. The `help` argument is now of type
`const char *` rather than a function pointer, and it is supposed to
contain the message to show in the `--help` screen. Pass `NULL` if no
help message is desired.
Signed-off-by: Haru <haru@dotalux.com>
|
|
As proposed in pull request #361
Signed-off-by: shennetsind <ind@henn.et>
|
|
- This helps figuring out why a plugin can't be loaded (especially on
linux systems.)
- Special thanks to Dastgir.
Signed-off-by: Haru <haru@dotalux.com>
|
|
|
|
|