summaryrefslogtreecommitdiff
path: root/src/login
AgeCommit message (Collapse)AuthorFilesLines
2014-11-11add AccountDB into login interface.Andrei Karas2-2/+5
2014-11-09Fixed a compilation error in MSVC <= 2012Haru1-2/+4
Special thanks to Angelmelody Signed-off-by: Haru <haru@dotalux.com>
2014-11-07Add login_config into login interface in login.cAndrei Karas2-0/+3
2014-11-07Add missing interface member initialisation in login.cAndrei Karas1-0/+1
2014-11-07Add login symbol in login server HPM.Andrei Karas1-0/+1
2014-11-07fix plugins compilation.Andrei Karas2-7/+7
2014-11-07Fix login_interface for allow generate hooks from it.Andrei Karas1-11/+14
2014-11-07Move global variables to interfaces in login.cAndrei Karas3-59/+62
2014-11-07Add most function to login interface in login.cAndrei Karas2-111/+230
2014-11-07Split packet handling from login_parse to functions in login.cAndrei Karas1-148/+187
2014-11-07Split packet handling from login_auth_ok to functions in login.cAndrei Karas1-24/+22
2014-11-07Split packet handling from login_parse_fromchar to functions in login.cAndrei Karas1-372/+534
2014-11-07Add prefix login_ to most functions in login.cAndrei Karas1-55/+55
2014-10-31Merge pull request #378 from HerculesWS/hpmupdatesHaruna5-18/+119
Char and login server preliminary support for the HPM system
2014-10-30Merge pull request #369 from 4144/sqlpasswordsizeHaruna3-6/+6
Increase sql password field size from 32 to 100 chars.
2014-10-28Added preliminary support for login and char server in the HPMDataCheckHaru5-18/+119
- Special thanks to Ind Signed-off-by: Haru <haru@dotalux.com>
2014-10-25Added some missing variable initializationsHaru1-0/+1
- The issue was caused by memcmp failing because of garbage in structs padding. - Fixes bugreport:8410, special thanks (and credits for the fix) to Garr http://hercules.ws/board/tracker/issue-8410-autotradeat-issue/ - Also reduced scope of some variables, where appropriate. - Thanks to Ind. Signed-off-by: Haru <haru@dotalux.com>
2014-10-23In configure add option --enable-staticAndrei Karas1-1/+1
This option enable static build for server binaries and map cache. For plugins this option enable static linking with gcc.
2014-10-18Increase sql password field size from 32 to 100 chars.Andrei Karas3-6/+6
32 chars is very small for password.
2014-09-20Fixed Bug 7926shennetsind1-0/+5
Login server will now reject login requests with empty userids. Special Thanks to Haruna, Kisuka! http://hercules.ws/board/tracker/issue-7926-login-and-password-empty/ Signed-off-by: shennetsind <ind@henn.et>
2014-08-07Corrected several format-string errors through the codeHaru1-18/+15
- 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-29Merge pull request #312 from vthibault/fix-argument-errorKisuka1-1/+1
Fix argument error in Client Hash
2014-07-28Fix argument error in Client HashVincent Thibault1-1/+1
2014-07-11Fixed reserved __identifier violationsHaru4-12/+12
- Complies with CERT DCL37-C - Fixes issue #293 (special thanks to elfring) Signed-off-by: Haru <haru@dotalux.com>
2014-07-09Fixed an issue in the 'Invalid client hash' console messageHaru1-1/+2
- MD5 value was incorrectly printed as int (displaying a meaningless number) while it's in fact a string. Signed-off-by: Haru <haru@dotalux.com>
2014-06-06Fixed garbage memory in the accinfo packetIbrahim Hossam1-4/+6
2014-05-30Merge pull request #282 from MrKeiKun/fix_typoHaruna5-12/+12
Fixed some typo
2014-05-30Fixed typos inside src/Shido5-12/+12
2014-05-30Removed CMakeLists.txt (Thanks to Haruna)Shido2-51/+0
2014-05-25Improved CFLAGS/CPPFLAGS handlingHaru1-1/+3
- Language extensions, such as _GNU_SOURCE are now enabled through CPPFLAGS by the configure script, rather than within the source code. - Moved some configure-time CFLAGS to CPPFLAGS, where appropriate. - Fixes bugreport:8211, thanks to Neoth http://hercules.ws/board/tracker/issue-8211-compiling-warning-in-linux Signed-off-by: Haru <haru@dotalux.com>
2014-05-13Removed trailing whitespace (sources)Haru1-3/+3
Signed-off-by: Haru <haru@dotalux.com>
2014-05-10Re-commit of "Fixed order of includes in all source files"Haru7-24/+42
This reverts commit 94657284973f4037596bae468ebfbee5c217e02b.
2014-05-10Revert "Fixed order of includes in all source files"panikon7-42/+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 filesHaru7-24/+42
- 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-09Added support to return a different exit status to the OS.Haru1-2/+2
- This can be easily used by plugins. - See an example at http://github.com/HerculesWS/StaffPlugins/Haru/script_mapquit Signed-off-by: Haru <haru@dotalux.com>
2014-04-17Added sysinfo (System Information) functionalitiesHaru1-1/+8
- More informative messages are displayed during startup, to make it easier to identify what system and environment Hercules is running. - Git/SVN revision detection is improved, separating the source version (cached at compile time) from the runtime version, in case the user updated their working copy without recompiling the server. Git version detection is also more reliable, in case a non-default branch is used. - The get_revision script command has been removed (as it was useless to begin with, after the switch to git). An alternative will be provided later, for feature-probing purposes. - The patch was tested under Linux (Gentoo / gcc 4.7 on i686 and x86_64, Debian 6 / gcc 4.4 on i686, Raspbian / gcc 4.6 on armv6l, CentOS 5 / gcc 4.1 on i686, CentOS 6 / gcc 4.4 on x86_64, Linux Mint 15 / gcc 4.7 on x86_64, OS X Mountain Lion / clang 5.0 and gcc 4.8 on x86_64, Cygwin-NT-5.1/gcc 4.8 on i686, FreeBSD 8 / gcc 4.2 on i386, FreeBSD 9 / gcc 4.2 on amd64, FreeBSD 10 / clang 3.3 on amd64, NetBSD 5 / gcc 4.1 on i386, NetBSD 6 / gcc 4.5 on amd64, OpenBSD 5 / gcc 4.2 on amd64, Solaris 11 / gcc 4.5 on i86pc, Windows 7 / Visual Studio 2012 on x86, Windows 8 / Visual Studio 2010 on WOW64, Windows 8.1 / Visual Studio 2013 on WOW64. Signed-off-by: Haru <haru@dotalux.com>
2014-03-16Added --load-plugin commandline argumentHaru1-1/+1
Signed-off-by: Haru <haru@dotalux.com>
2014-02-10Merge pull request #256 from hemagx/masterHaruna1-0/+40
Merged~ Thank you for your contribution to Hercules!
2014-02-08Improved client_hash_checkHaru1-17/+23
- Added option to disable hash check by GM group_id (specify 'disabled' as hash for a certain group_id to let them log in with any client, even if client_hash_check is enabled - Updated and reworded related documentation for the feature, following user feedback about certain parts being incomplete or confusing.
2014-02-02Introducing HPM Datacheckshennetsind4-12/+12
http://hercules.ws/board/topic/4283-introducing-hpm-datacheck/ Signed-off-by: shennetsind <ind@henn.et>
2014-02-02Update inter server so ask login server for account information Instead of ↵Ibrahim Hossam1-0/+40
do query to login table. Thanks to Haruna to clean it up.
2014-01-11Hercules 1st 2014 MegaPatchshennetsind4-112/+225
http://hercules.ws/board/topic/3886-hercules-1st-2014-megapatch/ Signed-off-by: shennetsind <ind@henn.et>
2013-12-30Fixed account expiration timeshennetsind2-10/+17
Login server no longer insta-denies expired accounts, as there may be free to play (or non paying) char server modes in the list, also made sure type 3 is sent as normal mode to non-expired accounts (client has a hardcoded if type == 3 => "claim need to pay & deny message" Special Thanks to Beret. Signed-off-by: shennetsind <ind@henn.et>
2013-12-17Fixed several compiler warningsHaru3-11/+10
- 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-20Added support for 'make plugin.pluginname' to compile only 'pluginname'Haru1-17/+21
- Various Makefile optimizations Signed-off-by: Haru <haru@dotalux.com>
2013-11-19Sanitized and improved several macros through the codeHaru1-2/+2
- Sanitized all potentially unsafe macros (related eA:15259) - Improved some function-like macros to evaluate their argument only once and keep it in a temporary variable. This improves performance in the damage calculation related code. Signed-off-by: Haru <haru@dotalux.com>
2013-11-16Introducing Character Ban Support.shennetsind1-12/+1
@charban/@charunban, can temporarily block any accounts as opposed to the usual account-wide block. Special Thanks to Haruna, Yommy! Signed-off-by: shennetsind <ind@henn.et>
2013-11-16Fixed char server's maintenance modeshennetsind1-4/+8
Enabling the maintenance mode will now restrict login based on group id (previously maintenance mode was merely cosmetic and would allow all accounts to access). Renamed char-server.conf setting char_maintenance to char_server_type, added char_maintenance_min_group_id to be used in conjunction with char_server_type:1 Signed-off-by: shennetsind <ind@henn.et>
2013-11-09HPM Support for plugin-implemented "--args" (options)shennetsind1-2/+0
As a necessary measure for the upcoming bot that will keep .sql files in sync with their .txt counterparts. Special Thanks to Haruna Signed-off-by: shennetsind <ind@henn.et>
2013-10-26Changed 'tick' variables to 64 bitHaru2-12/+8
- 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>