summaryrefslogtreecommitdiff
path: root/src/common
AgeCommit message (Collapse)AuthorFilesLines
2015-01-18Command line arguments handling overhaulHaru7-91/+331
- 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-18Implementing nullpo interface for plugin useshennetsind4-3/+24
As proposed in pull request #361 Signed-off-by: shennetsind <ind@henn.et>
2015-01-18Connection History Redesignshennetsind1-81/+56
Drops ~250kb in memory usage from each server, speeds up lookup/insertion and the cleanup timer will iterate thru the list rather than that ~65k array loop Signed-off-by: shennetsind <ind@henn.et>
2015-01-18Merge branch 'master' of github.com:HerculesWS/Herculesshennetsind1-1/+1
2015-01-18Fixing 38 issuesshennetsind3-11/+15
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-17Merge pull request #444 from 4144/coverityshennetsind1-1/+1
some fixes for different issues
2015-01-18Fix out of bound issue in mapindex.c.Andrei Karas1-1/+1
Found by coverity scan.
2015-01-1727 Fixesshennetsind1-1/+1
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-17Another ~10 Fixesshennetsind2-3/+5
Addressing out of bounds read/write, resource leaks. Special Thanks to 4144 and Haruna! Signed-off-by: shennetsind <ind@henn.et>
2015-01-1710 Distinct fixesshennetsind2-2/+3
Addressing out of bounds read-write. Special Thanks to 4144, Haruna! Signed-off-by: shennetsind <ind@henn.et>
2015-01-15Merge branch 'master' of https://github.com/HerculesWS/HerculesDastgir28-62/+95
2015-01-15Changed Zeny Limit in Bank to 2,147,483,647Dastgir1-1/+1
2015-01-12Fix some compilation warnings with clang 3.6.Andrei Karas1-1/+1
2015-01-12Silenced some -Wunused-value warnings in sigemptyset and sigaddset callsHaru1-7/+8
- Fixes warnings when gcc-4.9 is used, with headers (such as Apple's) that define those symbols as `#define sigemptyset(set) (*(set) = 0, 0)` - See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61081 Signed-off-by: Haru <haru@dotalux.com>
2015-01-12Removed unused (re)definition of NBBY from cbasetypes.hHaru1-6/+0
Signed-off-by: Haru <haru@dotalux.com>
2015-01-12Blocked compilation of plugins that use unavailable functionsHaru23-46/+81
- 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>
2015-01-12Added detailed error message when a plugin fails to loadHaru2-2/+5
- This helps figuring out why a plugin can't be loaded (especially on linux systems.) - Special thanks to Dastgir. Signed-off-by: Haru <haru@dotalux.com>
2015-01-10Add new eclage skills used in itemsMichieru1-0/+1
Update item_db to episode 14.2 Update eclage mobs spawn to official Update eclage mobs to official
2015-01-05Fix memory leak after closing mysql connection.Andrei Karas1-0/+1
2014-12-31Improve performance a bit by removing strlen(str) > 0.Andrei Karas1-1/+1
2014-12-31Fix checking result from function TryEnterCriticalSection.Andrei Karas1-1/+1
2014-12-31Remove useless checks.Andrei Karas1-1/+1
2014-12-31Add some missing null pointer checks after automatic checks.Andrei Karas3-18/+24
2014-12-26In linux enable thin-stream mode.Andrei Karas1-0/+11
It should reduce latency in some cases. See more info here: https://www.kernel.org/doc/Documentation/networking/tcp-thin.txt
2014-12-19Add struct item_data, mob_db and mob_data for pluginsAnnieRuru1-0/+15
http://hercules.ws/board/topic/7161-plugin-missing-hook-to-struct-item-data-and-mob-data/
2014-12-14Fixed some improper grammar.Mysteries1-1/+1
2014-12-10RENEWAL Updates:malufett1-0/+8
-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-06into mapindex add variable with default map and position.Andrei Karas2-2/+11
2014-12-04Merge pull request #394 from 4144/mapindexHaruna2-3/+12
In mapindex move check for default map into separate method.
2014-12-02Fix compilation without memory manager.Andrei Karas2-0/+4
configure example: ./configure --enable-manager=no
2014-11-16In mapindex move check for default map into separate method.Andrei Karas2-3/+12
2014-11-16Whitespace cleanup (no code changes)Haru32-927/+859
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-16Added missing strlib->jstrescapecpy initializationHaru1-0/+1
Signed-off-by: Haru <haru@dotalux.com>
2014-11-16Moved strlib_s, stringbuf_s and sv_s into strlib.cHaru2-3/+7
Signed-off-by: Haru <haru@dotalux.com>
2014-11-16Moved sql_s into sql.cHaru2-1/+3
Signed-off-by: Haru <haru@dotalux.com>
2014-11-16Moved DB_s into db.cHaru2-1/+3
Signed-off-by: Haru <haru@dotalux.com>
2014-11-16Moved HPM_s into HPM.c and removed the HPMi_s symbol from the coreHaru3-2/+4
Signed-off-by: Haru <haru@dotalux.com>
2014-11-15Add support for plugin options in map server config (script.conf).Andrei Karas1-0/+3
2014-11-15Add support for plugin options in map server config (logs.conf).Andrei Karas1-0/+3
2014-11-15Add support for plugin options in map server config (inter-server.conf).Andrei Karas1-1/+4
2014-11-15Add support for plugin options in char server config (inter-server.conf).Andrei Karas1-3/+6
2014-11-15Add support for plugin options in char server config.Andrei Karas1-1/+4
2014-11-15Add support for plugin options in login server config.Andrei Karas1-0/+3
2014-11-15regenerate HPM hooks.Andrei Karas1-0/+81
2014-11-14Add ability to add deprecated command from scripts and plugins.Andrei Karas1-2/+8
2014-11-11Corrected some uninitialized interface functionsHaru1-0/+1
- Detected through the just merged validation tool, special thanks to Andrei Karas. - Added validation tool to the Travis tests. Signed-off-by: Haru <haru@dotalux.com>
2014-11-07HPM Hooks Update.Andrei Karas1-0/+5
2014-11-03Merge branch 'master' of github.com:HerculesWS/Herculesshennetsind4-56/+137
Signed-off-by: shennetsind <ind@henn.et> Conflicts: src/map/battle.c
2014-11-03Introducing 2014-10-22, Roulette and Per-Char Gender!shennetsind1-1/+1
Details in http://hercules.ws/board/topic/7618-2014-10-22-roulette-and-per-char-gender/ Special Thanks to the all-mighty Yommy, Ziu and Haruna! Signed-off-by: shennetsind <ind@henn.et>
2014-10-28Added preliminary support for char and login server to HPMHookingHaru1-11/+24
- Special thanks to Ind Signed-off-by: Haru <haru@dotalux.com>