summaryrefslogtreecommitdiff
path: root/src/char/inter.c
AgeCommit message (Collapse)AuthorFilesLines
2015-01-24Fixed 18 minor issuesHaru1-0/+2
Signed-off-by: Haru <haru@dotalux.com>
2015-01-20Minor fixes and tweaks suggested by cppcheckHaru1-3/+2
- 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-1727 Fixesshennetsind1-21/+15
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>
2014-12-31fix typo in inter.c in initerface initialisation.Andrei Karas1-1/+1
2014-11-16Whitespace cleanup (no code changes)Haru1-40/+40
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-16Moved geoip-related functions to geoip.cHaru1-159/+0
Signed-off-by: Haru <haru@dotalux.com>
2014-11-15Move global variable into interface in inter.cAndrei Karas1-83/+83
2014-11-15Move global variable into interface in char.cAndrei Karas1-2/+2
Other variables better move to future char_config.
2014-11-15Create geoip interface.Andrei Karas1-27/+24
2014-11-15Add most functions from inter.c to interfaces.Andrei Karas1-112/+147
2014-11-15Add most functions from int_storage.c to interfaces.Andrei Karas1-3/+3
2014-11-15Add most functions from int_quest.c to interfaces.Andrei Karas1-1/+1
2014-11-15Add most functions from int_pet.c to interfaces.Andrei Karas1-3/+3
2014-11-15Add most functions from int_party.c to interfaces.Andrei Karas1-3/+3
2014-11-15Add most functions from int_mercenary.c to interfaces.Andrei Karas1-3/+3
2014-11-15Add most functions from int_mail.c to interfaces.Andrei Karas1-3/+3
2014-11-15Add most functions from int_homun.c to interfaces.Andrei Karas1-3/+3
2014-11-15Add most functions from int_guild.c to interfaces.Andrei Karas1-3/+3
2014-11-15Add most functions from int_elemental.c to interfaces.Andrei Karas1-3/+3
2014-11-15Add most functions from int_auction.c to interfaces.Andrei Karas1-3/+3
2014-11-15Add most functions from char.c to interfaces.Andrei Karas1-10/+11
Introduced interfaces: chr, mapif, loginif.
2014-11-15Split functions in inter.c.Andrei Karas1-16/+11
2014-11-15Add prefix inter_ to most functions in inter.cAndrei Karas1-57/+57
2014-11-15Add prefix char_ to most functions in char.cAndrei Karas1-4/+4
2014-10-30Merge pull request #369 from 4144/sqlpasswordsizeHaruna1-1/+1
Increase sql password field size from 32 to 100 chars.
2014-10-23Added some validation checks in the geoip parse functionHaru1-9/+14
This fixes the warning on some compilers, about the fread return value being ignored. Signed-off-by: Haru <haru@dotalux.com>
2014-10-18Increase sql password field size from 32 to 100 chars.Andrei Karas1-1/+1
32 chars is very small for password.
2014-09-16"Fixes char server crash when saving ##variables while login server is ↵Michieru1-5/+12
offline, thanks to Ancyker" Fix made by Ind :)
2014-08-07Fixed some MSVC incompatibilitiesHaru1-0/+1
- Resolves bugreport:8289 http://hercules.ws/board/tracker/issue-8289-compile-error-vs-2013/ - Disables some winsock-related deprecation warnings. Signed-off-by: Haru <haru@dotalux.com>
2014-08-07Corrected several format-string errors through the codeHaru1-5/+5
- 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-05-30Fixed typos inside src/Shido1-9/+9
2014-05-10Re-commit of "Fixed order of includes in all source files"Haru1-21/+22
This reverts commit 94657284973f4037596bae468ebfbee5c217e02b.
2014-05-10Revert "Fixed order of includes in all source files"panikon1-22/+21
This reverts commit b6b3f58795288701d0e162d43fa6f0a47af913b3. Fixes issue 8184 http://hercules.ws/board/tracker/issue-8184-cart-related/
2014-05-09Removed extra'GeoIP disabled' message on charserver shutdownHaru1-9/+10
Signed-off-by: Haru <haru@dotalux.com>
2014-05-09Fixed order of includes in all source filesHaru1-21/+22
- 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-08Fixed issue 8176panikon1-0/+1
http://hercules.ws/board/tracker/issue-8176-lastet-commit-cant-compile-successfully-on-linux/ Sorry for taking so long, it seems that even if errno.h is not included in MSVC errno is still available, but that doesn't happen in unix compilers.
2014-05-07Follow up to 9a425c1panikon1-5/+7
Special thanks to @MishimaHaruna
2014-05-06Bug fixes and other changespanikon1-16/+103
#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-18Rewritten NSI_UNIQUE_ID system to get rid of the cross-database interreg ↵Ibrahim Hossam1-19/+0
dependency - Removes the need for map-server to access the interreg table to store the last used ID. - Login, char and map databases can now be hosted separately. - Note: the unique_id structure has changed, and it now contains the generator character ID in its upper 32 bits. - Now NSI_UNIQUE_ID System is enabled always Special thanks to Haruna.
2014-03-06Minor whitespace fixHaru1-3/+1
(trying to trigger a HPM Hooks rebuild missing from my previous commit) Signed-off-by: Haru <haru@dotalux.com>
2014-02-27Cleaned up messages.confHaru1-130/+151
- 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>
2014-02-02Update inter server so ask login server for account information Instead of ↵Ibrahim Hossam1-67/+49
do query to login table. Thanks to Haruna to clean it up.
2014-01-11Hercules 1st 2014 MegaPatchshennetsind1-164/+253
http://hercules.ws/board/topic/3886-hercules-1st-2014-megapatch/ Signed-off-by: shennetsind <ind@henn.et>
2013-12-17Fixed several compiler warningsHaru1-1/+1
- Warnings detected thanks to Xcode's compiler settings (more strict by default) and clang, warnings mostly but not only related to data sizes on 64 bit systems, that were silenced until now by very lax compiler settings. - This also decreases by a great deal the amount of warnings produced by MSVC in x64 mode (for the adventurous ones who tried that) - Also fixed (or silenced in case of false positives) the potential issues pointed out by the (awesome) clang static analyzer. - Patch co-produced with Ind, I'm merging and committing in his place! Signed-off-by: Haru <haru@dotalux.com>
2013-11-29Update JOB_REBELLION 'job_db1.txt' to its official values and some mini ↵malufett1-1/+4
adjustment. Signed-off-by: malufett <malufett.eat.my.binaries@gmail.com>
2013-11-07Item Bound Fixes/Adjustments/Improvementsshennetsind1-9/+9
Special Thanks to Haruna Signed-off-by: shennetsind <ind@henn.et>
2013-10-31No error after compilation, but when logging in at map server it will crash.sevenzz231-2/+2
Im pretty sure its on the clif.c Signed-off-by: sevenzz23 <sevenzz23@yahoo.com>
2013-10-26Changed 'tick' variables to 64 bitHaru1-4/+4
- This fixes an issue with timers that stop working after about 24-49 days when the tick overflows (note that this may happen much earlier than that, and at hard to predict times, on some systems) - Updated the RDTSC help message in the configure script to also warn users about issues with SpeedStep enabled systems. - On Windows, tick() still has a resolution of 10~15ms (or even as low as 100ms on some systems). A TODO comment (thanks, Ai4rei) was added for a follow-up patch, as I want this one to be as small as possible) - Note: on Windows versions earlier than 6.x (Vista, Server 2008), the tick overflow issue is NOT fixed, since they don't support the function used to retrieve a 64 bit tick. This isn't a big issue, since those platforms are already - or going soon to be - out of their extended support period, and it's already advisable to upgrade, for other reasons. If you're the unfortunate user of such a system, it is recommended that you reboot your machine at least once every 49 days for Hercules to work reliably. - Note: To clear some doubts, since I've already been asked, this has absolutely NOTHING to do with 32/64 bit CPUs or OSes. It's all about a variable's size, not the size of registers of your CPU, and your 32bit CPU will be able to handle this just fine. Signed-off-by: Haru <haru@dotalux.com>
2013-09-29Provided argument-list equivalent for several variadic functionsHaru1-31/+70
This is necessary for the upcoming HPM hooking system
2013-09-25Merge branch 'master' of https://github.com/HerculesWS/Herculesshennetsind1-6/+7
Conflicts: src/map/chrif.c src/map/clif.c src/map/homunculus.c src/map/pet.c src/map/script.c src/map/skill.c src/map/status.c All clear.