Age | Commit message (Collapse) | Author | Files | Lines |
|
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>
|
|
|
|
|
|
This includes, and is not limited to: mixed or wrong indentation, excess
whitespace (horizontal and vertical), misalignment, trailing spaces.
Signed-off-by: Haru <haru@dotalux.com>
|
|
Signed-off-by: Haru <haru@dotalux.com>
|
|
- Special thanks to Ind
Signed-off-by: Haru <haru@dotalux.com>
|
|
- Special thanks to Ind
Signed-off-by: Haru <haru@dotalux.com>
|
|
|
|
Signed-off-by: Haru <haru@dotalux.com>
|
|
This reverts commit 94657284973f4037596bae468ebfbee5c217e02b.
|
|
This reverts commit b6b3f58795288701d0e162d43fa6f0a47af913b3.
Fixes issue 8184
http://hercules.ws/board/tracker/issue-8184-cart-related/
|
|
- Changed order according to the (upcoming) code style guidelines.
- Fixes several issues caused by missing headers when their include
order is changed or in plugins.
Signed-off-by: Haru <haru@dotalux.com>
|
|
Signed-off-by: Haru <haru@dotalux.com>
|
|
- More informative messages are displayed during startup, to make it
easier to identify what system and environment Hercules is running.
- Git/SVN revision detection is improved, separating the source version
(cached at compile time) from the runtime version, in case the user
updated their working copy without recompiling the server. Git
version detection is also more reliable, in case a non-default branch
is used.
- The get_revision script command has been removed (as it was useless
to begin with, after the switch to git). An alternative will be
provided later, for feature-probing purposes.
- The patch was tested under Linux (Gentoo / gcc 4.7 on i686 and x86_64,
Debian 6 / gcc 4.4 on i686, Raspbian / gcc 4.6 on armv6l, CentOS 5 /
gcc 4.1 on i686, CentOS 6 / gcc 4.4 on x86_64, Linux Mint 15 / gcc 4.7
on x86_64, OS X Mountain Lion / clang 5.0 and gcc 4.8 on x86_64,
Cygwin-NT-5.1/gcc 4.8 on i686, FreeBSD 8 / gcc 4.2 on i386, FreeBSD 9
/ gcc 4.2 on amd64, FreeBSD 10 / clang 3.3 on amd64, NetBSD 5 / gcc
4.1 on i386, NetBSD 6 / gcc 4.5 on amd64, OpenBSD 5 / gcc 4.2 on
amd64, Solaris 11 / gcc 4.5 on i86pc, Windows 7 / Visual Studio 2012
on x86, Windows 8 / Visual Studio 2010 on WOW64, Windows 8.1 / Visual
Studio 2013 on WOW64.
Signed-off-by: Haru <haru@dotalux.com>
|
|
Signed-off-by: Haru <haru@dotalux.com>
|
|
|
|
we are leaving these in stack when the size of packet exceeds declared size due to this line.
This was probably meant as if( packet_declared_size > packet_actual_size ) do_not_parse_it_yet,
but was doing the opposite.
|
|
Zones are now able to merge during runtime.
Special Thanks to Haru, kyeme.
http://hercules.ws/board/tracker/issue-7333-map-zone-db/
Signed-off-by: shennetsind <ind@henn.et>
|
|
http://hercules.ws/board/topic/4283-introducing-hpm-datacheck/
Signed-off-by: shennetsind <ind@henn.et>
|
|
As requested by the community in http://hercules.ws/board/topic/3832-hpm-custom-data-struct-for-instance-data-guild-data-and-party-data/
Signed-off-by: shennetsind <ind@henn.et>
|
|
We designed this one with having as little changes required elsewhere in mind, thus the way most socket-related things are called has not changed.
Plugins may now take a greater advantage of the socket features.
Signed-off-by: shennetsind <ind@henn.et>
|
|
Ready for plugin use.
Thanks to Haruna
Signed-off-by: shennetsind <ind@henn.et>
|
|
Made Possible Thanks to the Woonderful Haruna! <3
Commit also fixes an inconsistency in the ERS, where it'd start with clear memory but would use garbage upon resizing, also implements a new ERS option that clears entries as soon as pass by ers_free, so that they'll be all shinny for when ers_alloc reuses them.
Signed-off-by: shennetsind <ind@henn.et>
|
|
Special Thanks to Mhalicot.
Signed-off-by: shennetsind <ind@henn.et>
|
|
The field is now NULL when the value is not provided, instead of MAX_LEVEL.
Special Thanks to Mvmbles for bringing the issue to our attention.
Signed-off-by: shennetsind <ind@henn.et>
|
|
- Sanitized all potentially unsafe macros (related eA:15259)
- Improved some function-like macros to evaluate their argument only
once and keep it in a temporary variable. This improves performance
in the damage calculation related code.
Signed-off-by: Haru <haru@dotalux.com>
|
|
May be used as ./map-server --db2sql or by typing "server tools db2sql" within map-server console parse.
Special Thanks to Haruna.
Signed-off-by: shennetsind <ind@henn.et>
|
|
- Modified how the core handles it, making it easier to add new points.
- Modified how plugins call it, calls were made shorter, e.g. 'HPMi->getFromSession(session[fd],HPMi->pid,0)' => 'getFromSession(session[fd],0)' -- check src/common/HPMi.h #defines for all the options
- Added support for npc_data (getFromNPCD and so on) as requested in http://hercules.ws/board/topic/2923-hpm-custom-struct-npcs/
Signed-off-by: shennetsind <ind@henn.et>
|
|
As a necessary measure for the upcoming bot that will keep .sql files in sync with their .txt counterparts.
Special Thanks to Haruna
Signed-off-by: shennetsind <ind@henn.et>
|
|
Attempting to hook to a unknown hooking point will now display a message.
Added support for item bonuses
Check https://github.com/HerculesWS/StaffPlugins/tree/master/shennetsind/bCoolDownRate for a demonstration.
Signed-off-by: shennetsind <ind@henn.et>
|
|
http://hercules.ws/board/topic/2399-hpm-hooking-now-available/
Signed-off-by: shennetsind <ind@henn.et>
|
|
Also removed duplicate mentions of timer within calls to shorten.
|
|
- Custom Packet Support
- Custom Data Struct Support (currently append-able to map_session_data and socket_data)
- Char Server Support
- Login Server Support
http://hercules.ws/board/topic/1934-hercules-plugin-manager-update/
Documentation will soon be updated in http://hercules.ws/wiki/HPM
Signed-off-by: shennetsind <ind@henn.et>
|
|
Special Thanks to quesoph for bringing this to our attention.
Signed-off-by: shennetsind <ind@henn.et>
|
|
Adjusting db.c interface name to adhere with the rest (pretty much we try to make it as short as we can, and being there were no conflicts we saw no reason to maintain the 'i')
Signed-off-by: shennetsind <ind@henn.et>
|
|
Added iPc, iParty, iMap, iTimer to HPM exported interfaces
|
|
- Also fixed a bug preventing the plugins to be loeaded because HPMI and HPMI_s weren't HPExport
|
|
Made SQL and strlib functions HPM-friendly, special thanks to Yommy for bringing the issue up.
Added partial map.c support, for the all-handy map[] array, beware that soon the whole map.c renewal design will be commit and when that happens your usage of map.c functions in plugins might require some updates.
Signed-off-by: shennetsind <ind@henn.et>
|
|
also: modified encode_zip in grfio for a upcoming modification and some minor stuff in some other places.
Signed-off-by: shennetsind <ind@henn.et>
|