summaryrefslogtreecommitdiff
path: root/src/map/intif.c
AgeCommit message (Collapse)AuthorFilesLines
2016-05-01Fixed truncation of `@request` messagesHaru1-2/+2
- The `@request` command still makes an inter-server call. This will be fixed at a later point. Signed-off-by: Haru <haru@dotalux.com>
2016-04-30Changed the name of two intif functions, incorrectly named mapif_*Haru1-5/+6
- mapif_parse_WisToGM_sub() renamed to intif_parse_WisToGM_sub() - mapif_parse_WisToGM() renamed to intif_parse_WisToGM_sub() Signed-off-by: Haru <haru@dotalux.com>
2016-04-30Corrected truncation of the last letter in whisper messagesHaru1-3/+3
- Follow-up to ccfd054 - Fixes #1275 Signed-off-by: Haru <haru@dotalux.com>
2016-04-23Corrected the type of the 'length' argument of other message-related functionsHaru1-2/+2
- Variable types were changed to int - Corrects several warnings in VS2015 - Affected functions: `clif->wis_message()`, `intif->wis_message()`, `intif->guild_change_gm()`. Signed-off-by: Haru <haru@dotalux.com>
2016-04-23Removed the 'len' argument from clif_disp_onlyself() and clif->disp_message()Haru1-1/+1
- The argument was redundant, since the passed value is always the same as the passed string's length (it doesn't make sense otherwise). The argument is implicit now. Less typing and less errors. Signed-off-by: Haru <haru@dotalux.com>
2016-04-23Corrected the type of the 'length' argument of various broadcast-related ↵Haru1-3/+3
functions - Variable types were changed to int - Corrects several warnings in VS2015 - Affected functions: `clif->broadcast()`, `clif->broadcast2()`, `intif->broadcast()`, `intif->broadcast2()` Signed-off-by: Haru <haru@dotalux.com>
2016-04-23Corrected the type for several variables through the codeHaru1-2/+4
- Variable types were changed to int, where it makes sense to - Corrects several warnings in VS2015 Signed-off-by: Haru <haru@dotalux.com>
2016-03-20Dropped typedef from DBIteratorHaru1-2/+3
Signed-off-by: Haru <haru@dotalux.com>
2016-03-20Dropped typedefs from union DBKey and struct DBDataHaru1-2/+2
Signed-off-by: Haru <haru@dotalux.com>
2016-03-20Added const qualifier to some typecastsHaru1-2/+2
Signed-off-by: Haru <haru@dotalux.com>
2016-02-29Fix buffer overflow in guild notice change packet.Andrei Karas1-2/+2
2016-02-27Replaced various '-1' with the correct constantHaru1-1/+1
INFINITE_DURATION, INVALID_TIMER, SC_NONE, INDEX_NOT_FOUND, depending on context. Signed-off-by: Haru <haru@dotalux.com>
2016-02-24Removed several unnecessary explicit casts of the WFIFOP resultHaru1-4/+4
Signed-off-by: Haru <haru@dotalux.com>
2016-02-24Removed several unnecessary RFIFOP typecastsHaru1-35/+37
- While this is arguable, those explicit typecasts are potentially dangerous/misleading (for example, a const specifier might get accidentally dropped without even generating a compiler warning, or a variable type might change during code changes, and any related warning would get silenced by the explicit typecast). - As a reminder Hercules is written in C, and not in C++ (and there's no such thing as "compiling in C++ mode" - they're two different languages.) As such, it is legal to let the compiler automatically promote void* from/to any non-const pointer type, as well as const void* from/to any const pointer type. Signed-off-by: Haru <haru@dotalux.com>
2016-02-24Added const qualifier to several variable/argument pointersHaru1-10/+14
- This is necessary for compatibility with a const RFIFOP. Signed-off-by: Haru <haru@dotalux.com>
2016-02-19Fix all known warnings from compiler flags -Wformat*Andrei Karas1-15/+15
Add all missing -Wformat flags into configure.
2016-01-06Replaced the remaining explicit casts with BL_CAST/BL_UCASTHaru1-1/+1
Signed-off-by: Haru <haru@dotalux.com>
2016-01-06Change all TBL_PC to struct map_session_data as per style guidelineshemagx1-4/+6
Signed-off-by: Haru <haru@dotalux.com>
2015-12-22Not allow send too big variable names to char server from map server (Closes ↵Andrei Karas1-0/+4
#865) Closes #866 as merged
2015-12-22Ensured 32+1 bytes for all buffers that hold variable namesHaru1-11/+15
Related: #865, #866, #867 Signed-off-by: Haru <haru@dotalux.com>
2015-12-15Added GPL-compliant header to all sources and build scriptsHaru1-3/+20
Signed-off-by: Haru <haru@dotalux.com>
2015-12-05Removed some unnecessary assertionsHaru1-1/+1
- Follow-up to 81e0257 Signed-off-by: Haru <haru@dotalux.com>
2015-12-04Add missing checks to intif.cAndrei Karas1-2/+55
2015-10-19rename malloc.c/h to memmgr.Andrei Karas1-1/+1
2015-09-25More aggressive whitespace cleanup. Follow up to 51329e6Haru1-53/+45
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-3/+3
Signed-off-by: Haru <haru@dotalux.com>
2015-07-15Changed clif->message with clif->messagecolor_self as this will not crash on ↵Milchdealer1-1/+1
sepcial symbols
2015-06-19Removed ".." from include directivesHaru1-24/+24
- Include directives are now directory-independent. - This will allow building plugins from other directories in future. Signed-off-by: Haru <haru@dotalux.com>
2015-05-17Fixed some issues detected by coverity scanHaru1-3/+3
Signed-off-by: Haru <haru@dotalux.com>
2015-02-23Hercules Ultimate Localization Designshennetsind1-1/+1
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-20Minor fixes and tweaks suggested by cppcheckHaru1-8/+10
- 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-18Fixing 38 issuesshennetsind1-3/+0
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>
2014-11-16Whitespace cleanup (no code changes)Haru1-73/+74
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-10-05Follow up a46b190764df4cce0b378bc691218ac0814a5673shennetsind1-2/+2
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-3/+3
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 8151shennetsind1-3/+1
map server will no longer complain when it receives mail data for a character that is no longer online (its a pretty silly thing, consider you login, it requests mail data, you logout while it still hasn't arrived -> it annoys you with a warning when it arrives) Special Thanks to Frost! http://hercules.ws/board/tracker/issue-8151-at-first-time-show-error-in-console/ Signed-off-by: shennetsind <ind@henn.et>
2014-08-07Corrected several format-string errors through the codeHaru1-32/+34
- Functions that expect a printf-style format string are now marked as such, so that gcc/clang will emit a warning warn you if you mismatch format string and arguments. Signed-off-by: Haru <haru@dotalux.com>
2014-07-11Fixed reserved __identifier violationsHaru1-1/+1
- Complies with CERT DCL37-C - Fixes issue #293 (special thanks to elfring) Signed-off-by: Haru <haru@dotalux.com>
2014-05-30Fixed typos inside src/Shido1-5/+5
2014-05-17Renamed incuvate of Pet System.Shido1-2/+2
2014-05-13Removed trailing whitespace (sources)Haru1-1/+1
Signed-off-by: Haru <haru@dotalux.com>
2014-05-10Re-commit of "Fixed order of includes in all source files"Haru1-24/+27
This reverts commit 94657284973f4037596bae468ebfbee5c217e02b.
2014-05-10Revert "Fixed order of includes in all source files"panikon1-27/+24
This reverts commit b6b3f58795288701d0e162d43fa6f0a47af913b3. Fixes issue 8184 http://hercules.ws/board/tracker/issue-8184-cart-related/
2014-05-09Fixed order of includes in all source filesHaru1-24/+27
- 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>
2014-05-06Bug fixes and other changespanikon1-1/+19
#Fixed issue where a corrupted map cache would lead to a crash *Moved Big-endian compatibility functions to common/utils.h #Fixed issue 8162 *http://hercules.ws/board/tracker/issue-8162-loadnpc-doesnt-trigger-oninit-of-duplicate-npcs/ *Added options to npc_parse_duplicate #Fixed issue 8169 *http://hercules.ws/board/tracker/issue-8169-script-command-guildskill-skill-idlevel-not-working-as-intended/ *Changed *guildskill behavior, now it behaves exactly as depicted in the documentation *Updated *guildskill documentation #Added missing GBI types to mapif_parse_GuildBasicInfoChange now it's possible to change guild exp, lv, skill point and skill information #GeoIP revamp *GeoIP module was partially rewritten *Added several data checks to prevent corruption and crashes *Updated GeoIP database *See https://github.com/maxmind/geoip-api-c/blob/master/libGeoIP/GeoIP.c for more information #Added packetver checks regarding NST_MARKET *Now *tradertype warns if user is trying to use this feature with older clients
2014-04-19Follow up to 6f6a6b3panikon1-1/+1
* Added new method to handle refreshing the storage window when it was closed automatically by the client * http://hercules.ws/board/tracker/issue-8027-when-the-storage-is-open-you-can-use-self-skills * http://hercules.ws/board/tracker/issue-7694-guild-notice Follow up to d57781c * Fixed minor typo as pointed by @MishimaHaruna
2014-04-19Fixed issue: 8150panikon1-2/+2
* http://hercules.ws/board/tracker/issue-8150-cash-shop-updating-quantity-bug/ * Also fixed issue where when using ATitem to get more than one pet egg would result on getting only one egg * Changed packet 0x3880 structure now it also contains pet class and dropped flag from this packet, it was pointless
2014-03-29Minor script_add_str error/debug additionshennetsind1-0/+4
intif_parse_Registers now flags/unflags parser_current_file so that any possible naming issues with the variables being loaded are referenced here (previously they'd be reported anyway but without mentioning where it came from Signed-off-by: shennetsind <ind@henn.et>
2014-03-05Ref redesign, part 2Haru1-2/+2
- Reorganized regs var/array DBMaps into a specific reg_db structure Signed-off-by: Haru <haru@dotalux.com>