summaryrefslogtreecommitdiff
path: root/src/map/atcommand.c
AgeCommit message (Collapse)AuthorFilesLines
2015-09-18Follow-up to ba9c1cc16cb8f696a50d0ae928b6e8a19086405bHaru1-10/+10
Removed some redundant checks from atcommands (fixes a compiler warning in clang 7) Signed-off-by: Haru <haru@dotalux.com>
2015-09-14Add missing checks into channel.cAndrei Karas1-1/+1
2015-09-14Add missing checks into atcommand.cAndrei Karas1-503/+523
2015-08-26Fix buffer overflow in @set command. Closes #667Andrei Karas1-1/+1
2015-08-17Removed some useless variables reported by the Clang static analyzerHaru1-14/+8
Signed-off-by: Haru <haru@dotalux.com>
2015-08-15Added core HPM interfaceHaru1-2/+2
Signed-off-by: Haru <haru@dotalux.com>
2015-08-15HPM compatibility improvementsHaru1-0/+1
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>
2015-08-15Moved session array into the socket interfaceHaru1-1/+1
Signed-off-by: Haru <haru@dotalux.com>
2015-08-15Cleaned up socket interfaceHaru1-2/+2
- Replaced some macro calls with the proper interface syntax - Removed useless macros and workarounds API changes summary: - WFIFOSET() can now be safely used both inside and outside socket.c - RFIFOSKIP() can now be safely used both inside and outside socket.c - do_close() is now sockt->close() - flush_fifo() is now sockt->flush() - flush_fifos() is now sockt->flush_fifos() - getips() is now sockt->getips() - host2ip() is now sockt->host2ip() - ip2str() is now sockt->ip2str() - ntows() is now sockt->ntows() - make_connection() is now sockt->make_connection() - make_listen_bind() is now sockt->make_listen_bind() - realloc_fifo() is now sockt->realloc_fifo() - realloc_writefifo() is now sockt->realloc_writefifo() - session_isActive() is now sockt->session_is_active() - session_isValid() is now sockt->session_is_valid() - set_defaultparse() is now sockt->set_defaultparse() - set_eof() is now sockt->eof() - set_noblocking() is now sockt->set_noblocking() - str2ip() is now sockt->str2ip() Signed-off-by: Haru <haru@dotalux.com>
2015-07-25Reduce memory usage in HPM in skill.cAndrei Karas1-7/+7
2015-07-05Updated cash atcommand.Emistry1-2/+6
Return a message that tell GM how many points has been sent and what is the latest total amount of points accumulated by users.
2015-06-19Removed ".." from include directivesHaru1-46/+46
- Include directives are now directory-independent. - This will allow building plugins from other directories in future. Signed-off-by: Haru <haru@dotalux.com>
2015-06-02Follow-up to 42e1df9Haru1-1/+1
Fixed a @charban issue Signed-off-by: Haru <haru@dotalux.com>
2015-06-02Follow-up to 544a75bHaru1-3/+3
Signed-off-by: Haru <haru@dotalux.com>
2015-06-02Merge remote-tracking branch 'upstream/pr/530' into herculesHaru1-24/+5
2015-06-02Re-implemented clif->colormes to accept arbitrary colorsHaru1-8/+9
- Due to the backward-incompatible change, clif->colormes was renamed to clif->messagecolor_self (for similarity with clif->messagecolor). The 'color' argument is now a 0xRRGGBB color rather than a color_table index. - enum clif_colors is no longer needed, but 0xRRGGBB-based constants are now provided to replace the old COLOR_* values. Signed-off-by: Haru <haru@dotalux.com>
2015-06-01Follow up to Mishima's cleanup in ad958235cfLemongrass31101-24/+5
2015-06-01Replaced some of the hardcoded values with constants (map)Haru1-63/+55
- Replaced several hardcoded values with the appropriate enums. - Added documentation for some hardcoded values that haven't been replaced by enums (yet) - Minor code legibility improvements. Signed-off-by: Haru <haru@dotalux.com>
2015-06-01Replaced some of the hardcoded values with constants (char)Haru1-4/+6
- Replaced several hardcoded values with the appropriate enums. - Added documentation for some hardcoded values that haven't been replaced by enums (yet) - Minor code legibility improvements. Signed-off-by: Haru <haru@dotalux.com>
2015-05-11Merge pull request #508 from 4144/sanityHaruna1-1/+1
Extend sanity check configure flag with all sanity checks.
2015-05-05Typo when setting JoinAnnounce for channelsNihadm891-1/+1
The comment is right, but the wrong message number is there
2015-05-01Fix memory allocation error in atcommand.cAndrei Karas1-1/+1
2015-04-25Fixed @changesex issues on PACKETVERs that don't support per-character sex.Haru1-1/+1
- Fixes bugreport:8504 http://hercules.ws/board/tracker/issue-8504-changesex/ - Existing database entries with an incorrect per-character sex will be fixed automatically when the character logs in to match the account's sex, if the PACKETVER doesn't support per-character sex. Signed-off-by: Haru <haru@dotalux.com>
2015-02-23Hercules Ultimate Localization Designshennetsind1-992/+1078
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>
2015-01-24Channels refactoring: searchHaru1-20/+8
Signed-off-by: Haru <haru@dotalux.com>
2015-01-24Channels refactoring: joinHaru1-40/+17
Signed-off-by: Haru <haru@dotalux.com>
2015-01-24Minor channel system refactoringHaru1-54/+36
Signed-off-by: Haru <haru@dotalux.com>
2015-01-24Moved the Hercules Channel System to its own file/interfaceHaru1-109/+110
Signed-off-by: Haru <haru@dotalux.com>
2015-01-22Follow up 0957abd4d19b82b8dc8d7db2743008fa3daff3fashennetsind1-1/+1
Special Thanks to kyeme Signed-off-by: shennetsind <ind@henn.et>
2015-01-20Minor fixes and tweaks suggested by cppcheckHaru1-68/+75
- 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>
2015-01-18To help pinpoint and manage the issue report in 8402shennetsind1-0/+45
@cddebug command; broken entries will be normalized immediately, to forcefully reset the cooldown write "reset" i.e. @cddebug reset, to use on others the usual #cddebug "target" http://hercules.ws/board/tracker/issue-8402-serious-problem-with-skill-that-cant-be-cast-or-used/ Signed-off-by: shennetsind <ind@henn.et>
2015-01-18Command line arguments handling overhaulHaru1-1/+1
- 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>
2015-01-18Fixing 38 issuesshennetsind1-11/+12
Addressing out of bounds read/write, pointless null checks on already deferenced variables, dead code. Special Thanks to 4144 and Haruna! Signed-off-by: shennetsind <ind@henn.et>
2015-01-1727 Fixesshennetsind1-1/+2
Addressing out of bounds read/write, pointless null checks on already deferenced variables. Special Thanks to 4144 and Haruna! Signed-off-by: shennetsind <ind@henn.et>
2015-01-12Fix some compilation warnings with clang 3.6.Andrei Karas1-1/+1
2015-01-12Fixed some -Wformat-security warningsHaru1-2/+2
Signed-off-by: Haru <haru@dotalux.com>
2015-01-11Convert pcdb_checkid into function in pc interface.Andrei Karas1-1/+1
2015-01-02Add npcdb_checkid to npc interface.Andrei Karas1-3/+3
2014-12-31Improve performance a bit by removing strlen(str) > 0.Andrei Karas1-1/+2
2014-12-31Remove useless checks.Andrei Karas1-2/+2
2014-12-31Add some missing null pointer checks after automatic checks.Andrei Karas1-7/+5
2014-12-10RENEWAL Updates:malufett1-0/+6
-Homunculus Official Statuses -Updated RE @mobinfo to show proper status data.(Follow up 28a8b0f7b06a6af86aff6ececf7d9541d457e297) -Some official behaviors. Signed-off-by: malufett <malufett.eat.my.binaries@gmail.com>
2014-12-06add channels config into clif interface.Andrei Karas1-26/+26
2014-11-16Whitespace cleanup (no code changes)Haru1-1177/+1112
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>
2014-11-10Fix interfaces methods usage.Andrei Karas1-3/+3
In some places was used direct methods.
2014-10-24Renamed ismounting, setmounting, @mount2Haru1-3/+4
To avoid ambiguity: - The script command ismounting is now hascashmount - The script command setmounting is now setcashmount - The at-command @mount2 is now @cashmount Signed-off-by: Haru <haru@dotalux.com>
2014-10-24pc_isriding* / pc_setriding* cleanupHaru1-18/+17
- pc_isriding is now renamed to pc_isridingpeco, since that's what it checks (to avoid confusion). - pc_hasmount is added, to check for any of Peco, Dragon, Mado Gear, Wug Rider. - pc->setridingdragon is added. - pc->setridingwug is added. - pc->setfalcon type is changed. - pc->setmadogear type is changed. - pc->setridign is changed to pc->setridingpeco to avoid confusion. - Changed direct accesses to sd->sd.option to the proper pc_is* accessors, where applicable. - Special thanks to Kisuka. Signed-off-by: Haru <haru@dotalux.com>
2014-10-05Follow up a46b190764df4cce0b378bc691218ac0814a5673shennetsind1-1/+1
Dropped id2storage entirely, replaced with idb_get (1) it was redundant 2) the rename on a46b190764df4cce0b378bc691218ac0814a5673 was a very poor choice as plugins using the previous version would be calling the other). Signed-off-by: shennetsind <ind@henn.et>
2014-10-05Follow up b9b32ac7609eshennetsind1-1/+1
Fixes issue where kicking a online guild member (on a server with GP_BOUND_ITEMS defined) would render the guilds storage (if not previously loaded during the servers lifespan (since boot)) to be wiped. Special Thanks to Xgear! Signed-off-by: shennetsind <ind@henn.et>
2014-09-20Fixed bug 8186 (@who3)shennetsind1-1/+1
Issue where certain name patterns could cause the game client to crash, solved by changing the packet. Special Thanks to kyeme! http://hercules.ws/board/tracker/issue-8186-client-crashes-in-disguise-and-who/ Signed-off-by: shennetsind <ind@henn.et>