summaryrefslogtreecommitdiff
path: root/src/map/atcommand.c
AgeCommit message (Collapse)AuthorFilesLines
2015-10-19rename malloc.c/h to memmgr.Andrei Karas1-1/+1
2015-10-04Added clif->packet() to retrieve info about a packet.Haru1-4/+4
- As per Malufett/Michieru request, in order to make it possible for a plugin to obtain information about a packet. Signed-off-by: Haru <haru@dotalux.com>
2015-09-30Refactored ACMD(jobchange)Haru1-42/+41
- Follow-up to 7064ec3. - Fixes a logic issue issue preventing the command's help message to be shown when no arguments are specified. - Fixes #759, thanks to theultramage. Signed-off-by: Haru <haru@dotalux.com>
2015-09-25More aggressive whitespace cleanup. Follow up to 51329e6Haru1-25/+14
Signed-off-by: Haru <haru@dotalux.com>
2015-09-24Add bl parameter to map_searchrandfreecell and map_addflooritem.Andrei Karas1-1/+1
2015-09-24Add bl parameter to getcell functions.Andrei Karas1-8/+8
2015-09-21Corrected a VisualStudio compile issue.Haru1-6/+15
- Follow-up to ba9c1cc1 - Fixes #726 Signed-off-by: Haru <haru@dotalux.com>
2015-09-18Clarified intent in various side-effect assignmentsHaru1-1/+1
While this doesn't change anything in the way those assignments work, it clarifies that they're intended to be side-effect assignments and not typos (to both human readers and static analyzers) Signed-off-by: Haru <haru@dotalux.com>
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>