Age | Commit message (Collapse) | Author | Files | Lines |
|
Also move defines from map.h inot mapdefines.h for fix cycle include issue.
|
|
|
|
|
|
|
|
Signed-off-by: Haru <haru@dotalux.com>
|
|
Signed-off-by: Haru <haru@dotalux.com>
|
|
Signed-off-by: Haru <haru@dotalux.com>
|
|
Added some forgotten <stdio.h> and "common/conf.h" includes to .c files,
that were previously masked by the above.
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>
|
|
- Include directives are now directory-independent.
- This will allow building plugins from other directories in future.
Signed-off-by: Haru <haru@dotalux.com>
|
|
Servers can now run on any number of languages, without editing npc files.
Designed by Haruna and Ind
http://hercules.ws/board/topic/8687-hercules-ultimate-localization-design/
Signed-off-by: shennetsind <ind@henn.et>
|
|
- Rather than failing at runtime, plugins that try to access
non-interfaced, unavailable functions or variables, will now show an
error at compile-time.
Signed-off-by: Haru <haru@dotalux.com>
|
|
- Complies with CERT DCL37-C
- Fixes issue #293 (special thanks to elfring)
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>
|
|
- Removed some unused messages.
- Re-mapped some duplicate IDs - fixes bugreport:8057, thanks to
AnnieRuru http://hercules.ws/board/tracker/issue-8057-jobname-with-invalid-id-return-tomb/
- Fixed some issues with the message range loaded by the char server.
- Reworded some messages, fixed typos in others.
Note for translation users: some messages have been remapped to new IDs.
You'll need to remap them in your custom translations as well. The list
of changes is as follows:
- Removed messages (you can safely remove them from your translations):
15, 26-27, 35, 48-52, 57-58, 65-69, 82-83, 86-87, 91, 101, 140-142,
164, 189-194, 199-200, 202-203, 209-211, 215-218, 267-268, 275,
289-290, 380-385, 387-388, 401, 497, 499, 535-537, 922, 995, 1063,
1079, 1291-1294
- New messages (you need to add them to your translations): 15
- Moved messages (you need to change their IDs in your translations file):
* [Unknown Job] 656 -> 620,
* [Job names] 681~693 -> 656~668
* [Tombstone related] 656~661 -> 856~861
* [Etc messages] 662~680 -> 862~880
* [@version] 1436 -> 1294
* [Hercules Chat] 1475 -> 1436
Signed-off-by: Haru <haru@dotalux.com>
|
|
http://hercules.ws/board/topic/4283-introducing-hpm-datacheck/
Signed-off-by: shennetsind <ind@henn.et>
|
|
- Renamed function to a more appropriate name.
- Changed its last argument 'int type' to 'bool player_invoked' to make
its purpose more obvious.
Signed-off-by: Haru <haru@dotalux.com>
|
|
Altered many function types from int to bool(C99) and added meaningful return values.
Altered many function types from int to void as they didn't have any meaningful return value.
Replaced chrif_char_offline with a macro as this function did exactly the same as chrif_char_offline_nsd.
|
|
Signed-off-by: shennetsind <ind@henn.et>
|
|
- HPMi->addCommand is now addAtcommand, dropped usage of ACMD_A()
- HPMi->addScript is now addScriptCommand, dropped usage of BUILDIN_A()
- HPMi->addCPCommand is now addCPCommand, dropped necessity of CPCMD_A()
- HPMi->addPacket is now addPacket, 5th param (HPMi->pid) is now automatically filled by the macro, therefore param count drops to 4 (packetID,packetLength,packetFunction,packetIncomingPoint).
There is no longer necessity to check for the availability of the commands, the macros will do it on their own and drop a warning about it upon failure.
These changes won't affect pre-compiled plugins.
Signed-off-by: shennetsind <ind@henn.et>
|
|
Introducing the Hercules Standalone Script Syntax Checker
|
|
So that HPM plugins are able to override default commands, thanks to Akkarin for bringing it up.
Signed-off-by: shennetsind <ind@henn.et>
|
|
- Added a command line argument '--script-check' to check a script's
syntax without running the server (and without requiring a SQL
connection). Usage: ./map-server --script-check /path/to/the/script.txt
- For convenience, a script-checker bash script is provided, to set the
path correctly when called from a different directory. Usage:
/path/to/Hercules/script-checker /path/to/the/script/to/check.txt
- While the script checker will supposedly work under windows as well,
no convenience scripts are currently provided for platforms other than
UNIX (feel free to open a pull request with a .bat launcher or
whatever you like)
- Integration with IDEs or text editors is possible. In fact, I already
have a fully functional plugin for vim (through vim-syntastic), and if
there's enough interest, I'll publish it. - screenshot: http://d.pr/i/NOBD
- If you want an online checker, http://haru.ws/scriptchecker/ is
running this code, without modifications and will be kept up to date
(without any warranty though.)
- Special thanks to Ind, Yommy, Streusel, who helped making this
possible, in a way or another.
|
|
Modified how @commands from HPM plugins are handled so that they are persistent to @reloadatcommand (also prepares for the future load/unload during runtime feature)
http://hercules.ws/board/tracker/issue-7759-reloadatcommand/
Signed-off-by: shennetsind <ind@henn.et>
|
|
Moved missing vars and declarations of interest into the interface.
Signed-off-by: shennetsind <ind@henn.et>
|
|
* 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.
|
|
Special Thanks to Shikazu, wouldn't have been able to identify this issue without his help!
http://hercules.ws/board/index.php?app=tracker&showissue=7216
Signed-off-by: shennetsind <ind@henn.et>
|
|
http://hercules.ws/board/topic/549-introducing-hercules-plugin-manager/
Signed-off-by: shennetsind <ind@henn.et>
|
|
http://hercules.ws/board/topic/470-hercules-april-22-patch/
Signed-off-by: shennetsind <ind@henn.et>
|
|
[16969:16991/trunk/src/] will be re-committed in the next 24 hours.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16992 54d463be-8e91-2dee-dedb-b68131a5f0ec
|
|
Removed /SAFESEH option from MSVC11 projects.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16968 54d463be-8e91-2dee-dedb-b68131a5f0ec
|
|
list a pointer array, this also allows the system to have a unlimited amount of atcommand bind instances. also fixed a memory leak that'd be caused when npc_do_atcmd_event fails (e.g. when target npc is manually reloaded)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16485 54d463be-8e91-2dee-dedb-b68131a5f0ec
|
|
original version by ToastOfDoom however heavily modified by I enabling command level at the invoking/character (@/#) level and fixes to prevent console errors as well as fixes aimed to ensure compatibility with rAthena.
Updated the script_commands.txt documentation with the following script commands: bindatcmd, unbindatcmd and useatcmd.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16471 54d463be-8e91-2dee-dedb-b68131a5f0ec
|
|
and atcommand permissions saving thousands of thousands of dbmap lookups.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16443 54d463be-8e91-2dee-dedb-b68131a5f0ec
|
|
http://www.hyperrealm.com/libconfig/):
- Updated VS9/10 project files.
- Updated `configure` & `Makefile`s.
- New GM, Commands & Permissions system:
- '''This is a backwards compatibility breaking update''', please read tid:58877
- Replaced GM levels with Player Groups.
- Commands permissions & other privileges now depend on group, not GM level.
- `@help` command improvements: requires "commandname" param and shows more detailed info about commands.
- Modified GM whisper system to deliver messages basing on permissions, not GM level.
- Remote trade request is now possible only if player is allowed to use `@trade` command as well.
- Added a proper permission to use `/changemaptype` command.
- `clif_displaymessage` is now capable of displaying multiline messages.
- All `ACMD_FUNC`s are static now, and the only way to invoke them is with `is_atcommand()`; all client commands (starting with `/`) are now translated into corresponding atcommands (with exception of `/kick` used on monster, as there is no atcommand to kill single monster).
- Removed nonsense "bot check" triggering when player blocked (`/ex`) Server.
- Merged `@monster`, `@monsterbig` and `@monstersmall`.
- Improved flow of atcommand execution to avoid revealing info about online players or existing commands to non-privileged players.
- Merged `atcommand` and `charcommand` script functions (`charcommand` is aliased to `atcommand`).
- Fixed `atcommand` script function reading unknown memory area (possible access violation).
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15572 54d463be-8e91-2dee-dedb-b68131a5f0ec
|
|
modified/added/removed in the front-end within atcommand_conf (no longer hardcoded). The aliases pattern was defined in this topic: tid:56343 atcommand_conf file rewrite/update belongs to Jguy and BrianL
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15343 54d463be-8e91-2dee-dedb-b68131a5f0ec
|
|
- Added checks/warnings to pc_paycash and pc_getcash (follow up to r12264).
- Added missing packet_db.txt and packet length table entries for packet 0x0859 (follow up to r14799).
- Added set of map_id2xx wrappers for map_id2bl for most common map objects, which return NULL when the bl-type is not the expected one (also updated map_id2nd to behave this way).
- Fixed missing ',' in mob_skill_db.txt example (follow up to r14270).
- Updated mapcache with recent maps (up to que_lhz).
- Functions 'msg_txt' and 'job_name' now return a const pointer.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14813 54d463be-8e91-2dee-dedb-b68131a5f0ec
|
|
* moved @kick gm level check to the part that kicks players
* added @killmonster gm level check to the part that kills monsters
* added missing reply to client in the part that unloads npcs
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14250 54d463be-8e91-2dee-dedb-b68131a5f0ec
|
|
- replaced gmlvl arg with a flag arg for internal/player generated checks. (dummy sds that used this arg are given gm levels)
- each command check runs through is_atcommand() and is checked for its origin (internal or player generated)
- charcommands are also parsed in this function.
- script atcommand/charcommand function calls to is_atcommand() have been updated
- also updated some clif/map functions calls to is_atcommand()
* charcommands should now log properly with the target of the command included.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13545 54d463be-8e91-2dee-dedb-b68131a5f0ec
|
|
* Added more commands to configurations (bugreport:2565)
* Added a missing charcommand symbol config to atcommand configs.
* GM command configs under the old format will have a warning printed back to the console as being deprecated.
* Other fixes/cleaning partially resolving bugreport:2549
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13409 54d463be-8e91-2dee-dedb-b68131a5f0ec
|
|
functionality.
Charcommands still retain their '#' symbol but now looks for a character name as the first parameter instead of last.
Atcommand configs now support charcommand level configurations by comma seperation (e.g. 60,99)
As a result of this, all atcommands that don't affect multiple users already (@kickall, @doom, @mapexit) are capable of remote usage.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13403 54d463be-8e91-2dee-dedb-b68131a5f0ec
|
|
* kRO have a possible way to read mail by just sending the open mail window packet to the client.
This protection adds a mapflag town, to set the only maps that allow mail operations.
because there is no way to know when client closes the mail inbox window. *
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12279 54d463be-8e91-2dee-dedb-b68131a5f0ec
|
|
(bugreport:790).
Added support for right-click-gm-menu kicking NPC objects.
Removed redundant function npc_checknear2().
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12073 54d463be-8e91-2dee-dedb-b68131a5f0ec
|
|
* separated the execution part of command code into interface part and internal part to better see which checks are done and when (fixes problem where 'nocommand' mapflag blocked server npcs)
* moved the internal commands list (array) to the end of the file, this let me discard that long block of ACMD_FUNC() declarations
* removed enum AtCommandType from command headers and commands array; its purpose was perhaps to identify aliased commands, but apparently it was never finished because the rest of the code doesn't use it (also doing aliases like this is not a very good idea)
* internally, commands are now referenced to using their function name
* removed the @/# symbols from the command lists; all lookup functions will now properly deal with strings with- and without a command symbol (commands interface still requires the symbol tho', so TODO for later)
* removed several unneeded commands (*id2 code, dmalloc debug commands)
* reverted atcommand config from alphabetically-sorted to how it was before (with additional fixes; see /conf changelog)
* added missing code for #dropall / #storeall
* added a warning when trying to set gm level of an undefined command
The structure of the commands table has changed, please adjust docs/guides to match the new format (sorry for the inconvenience).
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11607 54d463be-8e91-2dee-dedb-b68131a5f0ec
|