summaryrefslogtreecommitdiff
path: root/src/char
AgeCommit message (Collapse)AuthorFilesLines
2015-08-13Corrected some include guardsHaru2-6/+6
- Fixes some future issues with the HPMDataCheck system. Signed-off-by: Haru <haru@dotalux.com>
2015-08-12Fix weapon field size in char_mmo_char_tobuf.Andrei Karas1-1/+1
2015-08-11subnet.conf overhaulHaru2-90/+28
The subnet.conf system has been rewritten to offer greater flexibility, and to fix some issues that appeared with 838321a36c79e71117320154c9b611c99e93af03. It is now possible to enter, separately, LAN subnets: - `lan_subnets`: This is essentially the same feature present in the old subnet.conf. Each entry in this list defines a (LAN, private) subnet the server is in. Clients connecting from the same subnet, will be redirected to the LAN IP rather than the default public IP. The format has been simplified, and it only requires one IP and one subnet mask (as opposed to a character and a map server IP). - `allowed`: Allowed IPs are IP ranges a server (char to login or map to char) can connect from. Any attempt to connect as a server from an IP not included here, will fail. For convenience, a wildcard range (matching all possible IP addresses) has been provided (`0.0.0.0:0.0.0.0`), but it is very advisable to edit it to a more restrictive set. - `trusted`: Trusted IPs are IP ranges excluded from the IPban checks. This may be useful, for example, to exclude the server's own IP from ipbans, in case of false positives. Any IP ranges added to this list are also implicitly included in the allowed IP ranges.
2015-08-09Removed unused tables sstatus and interregHaru2-4/+0
Signed-off-by: Haru <haru@dotalux.com>
2015-08-05Add checks for servers ip address in inter server connections.Andrei Karas2-5/+7
If ip not in configured subnet, connection refused. This can protect servers from brutforcing attacks.
2015-07-12Remove useless checks from char server.Andrei Karas4-4/+1
2015-07-12Add missing checks to pincode.cAndrei Karas1-1/+2
2015-07-12Add missing check and NONNULL attributes to char.c.Andrei Karas1-0/+17
2015-06-22Fixing party creation failure conditionAncyker1-1/+0
mapif_party_created was incorrectly checking for a null pointer
2015-06-19Cleaned up HPMDataCheck includesHaru1-0/+12
Fixes some plugin load failures Signed-off-by: Haru <haru@dotalux.com>
2015-06-19Cleaned up some #includesHaru24-36/+41
Signed-off-by: Haru <haru@dotalux.com>
2015-06-19Removed ".." from include directivesHaru32-257/+259
- 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 712812bMysteries1-1/+1
- More link changes - Added proper link to Roulette topic
2015-06-01Replaced some of the hardcoded values with constants (char)Haru4-79/+76
- 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-17Fixed some issues detected by coverity scanHaru3-12/+14
Signed-off-by: Haru <haru@dotalux.com>
2015-04-25Fixed @changesex issues on PACKETVERs that don't support per-character sex.Haru2-125/+192
- 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-04-12Fix issue http://hercules.ws/board/tracker/issue-8620-error-in-quest/Andrei Karas1-2/+3
2015-04-10Fixed some compiling errors under MSVCcsnv2-2/+6
Introduced on: dab1fba3a88b9c5e86a778a29bd4d565fc937155
2015-04-09Add checks to pincode.cAndrei Karas1-1/+14
2015-04-09Add checks to loginif.cAndrei Karas1-0/+9
2015-04-09Add checks to inter.cAndrei Karas1-1/+23
2015-04-09Add checks to int_storage.cAndrei Karas1-1/+7
2015-04-09Add checks to int_quest.cAndrei Karas1-1/+4
2015-04-09Add checks to int_pet.cAndrei Karas1-0/+6
2015-04-09Add checks to int_party.cAndrei Karas1-0/+14
2015-04-09Add checks to int_mercenary.cAndrei Karas1-0/+6
2015-04-09Add checks to int_mail.cAndrei Karas1-0/+12
2015-04-09Add checks to int_homun.cAndrei Karas1-0/+7
2015-04-09Add checks to int_guild.cAndrei Karas1-3/+45
2015-04-09Add checks to int_elements.cAndrei Karas1-0/+4
2015-04-09Add checks to int_auction.cAndrei Karas1-1/+7
2015-04-09Add checks to char.cAndrei Karas1-29/+79
2015-04-01Fix reading character from db.Andrei Karas1-1/+1
2015-01-24Fixed 18 minor issuesHaru3-3/+8
Signed-off-by: Haru <haru@dotalux.com>
2015-01-20Fixes Compile Error on WindowsDastgir1-1/+1
2015-01-20Minor fixes and tweaks suggested by cppcheckHaru10-69/+54
- 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-18Command line arguments handling overhaulHaru3-29/+68
- 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-18Replacing rand leftovers with the mt19937arshennetsind1-1/+1
Signed-off-by: shennetsind <ind@henn.et>
2015-01-18Merge branch 'master' of github.com:HerculesWS/Herculesshennetsind2-2/+3
2015-01-18Fixing 38 issuesshennetsind1-2/+2
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/coverityshennetsind2-2/+3
some fixes for different issues
2015-01-18Add some fixes to char server.Andrei Karas2-2/+3
Found by coverity scan.
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>
2015-01-17Another ~10 Fixesshennetsind1-2/+2
Addressing out of bounds read/write. Special Thanks to 4144 and Haruna! Signed-off-by: shennetsind <ind@henn.et>
2015-01-1710 Distinct fixesshennetsind1-5/+5
Addressing out of bounds read-write. Special Thanks to 4144, Haruna! Signed-off-by: shennetsind <ind@henn.et>
2015-01-17Stat server submission logic updateshennetsind1-1/+12
to ensure report is submit in full. Signed-off-by: shennetsind <ind@henn.et>
2015-01-12Fixed some -Wformat-security warningsHaru5-18/+14
Signed-off-by: Haru <haru@dotalux.com>
2015-01-12Blocked compilation of plugins that use unavailable functionsHaru17-0/+36
- 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-07Fixed char-server crash for clients >= 20141022, Thanks to Yommy and Inddastgirpojee1-5/+4
2014-12-31Fix wrong useless cycle added in commit ↵Andrei Karas1-1/+1
c47d8e4b8f9d63ab6b4e7e286e91cd50a5bdd151.