summaryrefslogtreecommitdiff
path: root/src/login/login.c
AgeCommit message (Collapse)AuthorFilesLines
2013-12-17Fixed several compiler warningsHaru1-5/+5
- 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-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 bitHaru1-9/+6
- 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-10-16Follow-up to fad3040499293b1ff4ff634680163fcab4ca5e70Haru1-1/+1
- Corrected token length limit detection when the token is shorter than 32 characters. Special thanks to Lemongrass3110. Signed-off-by: Haru <haru@dotalux.com>
2013-10-11Fixed login packet 0x825shennetsind1-8/+7
Special Thanks to Haru, Yommy. Signed-off-by: shennetsind <ind@henn.et>
2013-09-25Renamed iTimer interface to timer.shennetsind1-13/+13
Also removed duplicate mentions of timer within calls to shorten.
2013-08-08HPM Updateshennetsind1-16/+33
- Custom Packet Support - Custom Data Struct Support (currently append-able to map_session_data and socket_data) - Char Server Support - Login Server Support http://hercules.ws/board/topic/1934-hercules-plugin-manager-update/ Documentation will soon be updated in http://hercules.ws/wiki/HPM Signed-off-by: shennetsind <ind@henn.et>
2013-07-04Fixed Bug #7476shennetsind1-0/+3
http://hercules.ws/board/tracker/issue-7476-failed-to-start-login-server/ Signed-off-by: shennetsind <ind@henn.et>
2013-07-03Dropped engine setting, closing bug #7455.Matheus Macabu1-71/+15
Signed-off-by: Matheus Macabu <mkbu95@gmail.com>
2013-06-08Follow up d73783f22b2bb881aab74524d153d89a5932a199shennetsind1-3/+3
Adjusting db.c interface name to adhere with the rest (pretty much we try to make it as short as we can, and being there were no conflicts we saw no reason to maintain the 'i') Signed-off-by: shennetsind <ind@henn.et>
2013-06-07Hercules Renewal Phase One : pc, party, map, timerSusu1-16/+16
Added iPc, iParty, iMap, iTimer to HPM exported interfaces
2013-05-18Some type conversion warnings fixed. If this breaks anything create a bug ↵Matheus Macabu1-2/+2
report ASAP and I will revert it gladly. Signed-off-by: Matheus Macabu <mkbu95@gmail.com>
2013-05-17- Made DB and malloc lib HPM-friendlySusu1-3/+3
- Also fixed a bug preventing the plugins to be loeaded because HPMI and HPMI_s weren't HPExport
2013-05-02Introducing Hercules Plugin Manangershennetsind1-55/+2
http://hercules.ws/board/topic/549-introducing-hercules-plugin-manager/ Signed-off-by: shennetsind <ind@henn.et>
2013-04-16Fixed Bug #86 (YES 2-DIGITS!)shennetsind1-2/+2
http://hercules.ws/board/tracker/issue-86-login-id12-bad-values/ Signed-off-by: shennetsind <ind@henn.et>
2013-04-10Implementing the new "login-failed" packetshennetsind1-3/+16
Signed-off-by: shennetsind <ind@henn.et>
2013-03-17Follow up 3b89a135dcde9779bd0537cd136a7c34cfadbe3fshennetsind1-7/+0
Dropping the not-used setting from the previous implementation. http://hercules.ws/board/topic/272-re-introducing-console-input/ Signed-off-by: shennetsind <ind@henn.et>
2013-03-16Follow up fixed for Pin Code Featuremalufett1-1/+1
-Fixed some warning in Windows. -Fixed 'pincode_charselect' where it doesn't work properly Signed-off-by: malufett <malufett.eat.my.binaries@gmail.com>
2013-03-14Fixed Pin Code Featureshennetsind1-1/+1
Now cross-platform, and stable ( after fixing I tested it a couple dozen times ). Special Thanks to Yommy for providing me with his packet list, without it I would have never figured what was wrong with it. Special Thanks to Jeroen who reported a inconsistency on the feature when used on windows. Signed-off-by: shennetsind <ind@henn.et>
2013-03-09Hercules Renewal'd Pin Codeshennetsind1-2/+45
Feature is not, I repeat, NOT complete. the decryption is not fully functional which leads to dial values different from the ones the player used. Credits: lemongrass3110 for the base yommy for the packets LightFighter for the decrypt function (altho its not stable :P) Signed-off-by: shennetsind <ind@henn.et>
2013-03-04Introducing account-dependent character slot countshennetsind1-7/+10
As requested in http://hercules.ws/board/topic/248-reserved-slot-system/ Signed-off-by: shennetsind <ind@henn.et>
2013-02-18Improvements all over the placeshennetsind1-3/+4
Committing on the behalf of mkbu95 who is unable to do it himself, he coded it all and sent me the diff. Thanks mkbu95! Signed-off-by: shennetsind <ind@henn.et>
2013-02-16Updating the Headers across source filesshennetsind1-1/+1
And adding missing ones. Signed-off-by: shennetsind <ind@henn.et>
2013-02-16Minor changes; check descriptionshennetsind1-9/+10
Login and Char servers will now exit when failing to bind to the port (as map server has always done). Moved Sql_HerculesUpdateCheck() to be run before "server is 'ready' " thing for layout-purposes. Signed-off-by: shennetsind <ind@henn.et>
2013-02-14Introducing MySQL DB Update Checkershennetsind1-1/+3
First version. Signed-off-by: shennetsind <ind@henn.et>
2013-02-07Fixing mistake in modified source code headersshennetsind1-1/+1
Signed-off-by: shennetsind <ind@henn.et>
2013-01-31Fixed Bug #3080shennetsind1-3/+4
Replaced strncpy with safestrncpy where I found would be beneficial. http://hercules.ws/board/tracker/issue-3080-safestrncpy-instead-of-strncpy-where-applicable/ Also modifying headers accordingly. Signed-off-by: shennetsind <ind@henn.et>
2012-12-05- Undid r16968: SVN Replaced with source:/trunk/src/@16966 (tid:74924).brianluau1-1580/+1618
[16969:16991/trunk/src/] will be re-committed in the next 24 hours. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16992 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-11-25Applied AStyle code formating as discussed on tid:74602.greenboxal21-1618/+1580
Removed /SAFESEH option from MSVC11 projects. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16968 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-11-20Console clean up, dropped quite a few pointless messages and modified others ↵shennetsind1-16/+8
to only be displayed when relevant (e.g. you dont need to know you have only 1 subnetwork) Improved the debugging of scripts when an amount greater than supported of arguments is used. Follow up r16935 -- commit missed the script.c part of it. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16936 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-11-091. Follow up r16891 small improvement over there by dropping a pointless ↵shennetsind1-44/+22
entry in the trace hierarchy 2. Modified DNSBL check on login server to stop looking up addresses on the first match, also applied my curly brace love in the way. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16893 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-11-09- Updated the list of dnsbl_servers. (bugreport:6862)brianluau1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16887 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-09-11Fixed bugreport:6671 compiler shows a warning for incompatible arguments for ↵greenboxal21-5/+7
sscanf. Removed client hash check for server connection authentication. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16775 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-09-10Added missing memory finalization for client_hash_nodes linked list.greenboxal21-0/+8
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16772 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-09-10Added client MD5 hash check option to login-server.greenboxal21-0/+68
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16771 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-05-31Fixed bugreport:5828 Added missing min_group_id_to_connect functionality to ↵shennetsind1-2/+11
login server (presumably removed by accident in r15572). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16185 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-04-22* Merged changes up to eAthena 15087.eathenabot1-9/+34
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15927 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-03-13Enhanced `DBMap` implementation to allow storing integer type data in ↵gepard19841-8/+17
addition to void pointers. - Added enum for data: `int`, `unsigned int` and `void*` - Replaced generic `void*` data with `DBData` struct to hold `int`, `unsigned int` or `void*` (member of `DBNode`) - Added `db_i2data`, `db_ui2data` and `db_ptr2data` functions to cast from `int`/`uint`/`void*` to `DBData` (used in `DBMap::put()`) - Added `db_data2i`, `db_data2ui` and `db_data2ptr` functions to get `int`/`uint`/`void*` from `DBData` - Enabled statistics for new functions in `db_stats` struct - `DBCreateData` functions (used in `DBMap::ensure()`) now return `DBData` instead of `void*` - `DBApply` functions (used in `DBMap::foreach()` and `DBMap::destroy()`) now take `DBData*` as a parameter instead of `void*` - `DBMatcher` functions (used in `DBMap::getall()`) now take `DBData` as a parameter instead of `void*` - `DBReleaser` functions now take `DBData` as parameter instead of `void*` - Default releasers release data if it is `void*` (`DB_DATA_PTR`) type - `DBIterator` functions: `first()`, `last()`, `next()` and `prev()` now return `DBData*` instead of `void*` - `DBIterator::remove()` now returns `int` (1 if node was found and removed, 0 otherwise) instead of `void*` and takes an extra `DBData*` parameter for the data of removed entry - `DBMap::get()` and `DBMap::ensure()` now return `DBData*` instead of `void*` - `DBMap::remove()` and `DBMap::put()` now return `int` (1 if node already existed, 0 otherwise) instead of `void*` and take an extra `DBData*` parameter for the data of removed entry - `DBMap::put()` now takes `DBData` as parameter instead of `void*` - `DBMap::getall()` now puts data into `DBData**` buffer instead of `void**` buffer - Updated macros: - (`i`/`ui`/`str`)`db_get` and (`i`/`ui`/`str`)`db_ensure` were wrapped with `db_data2ptr` to extract data from `DBData*` that is now returned by `DBMap::get()` - added (`i`/`ui`/`str`)`db_iget` and (`i`/`ui`/`str`)`db_uiget` that get `DBData` from `DBMap` and extract `int`/`unsigned int` from it (with `db_data2i`/`db_data2ui`) - `db_put`, `idb_put`, `uidb_put` and `strdb_put` data params were wrapped with `db_ptr2data` to match new signature of `DBMap::put()` (`DBData` instead of `void*`) - added (`i`/`ui`/`str`)`db_iput` and (`i`/`ui`/`str`)`db_uiput` that put `int`/`unsigned int` into `DBMap` (first wrapping it with `DBData`) - added `NULL` in place of extra parameter for removed data in `db_remove` macros - `dbi_first`, `dbi_last`, `dbi_next` and `dbi_prev` were wrapped with `db_data2ptr` to extract data from `DBData*` that is now returned by these `DBIterator` functions - Updated `DBMap` documentation, and fixed a dozen of typos in it. - Updated rest of rA code to reflect `DBMap` changes (mostly required signature changes of `DBCreateData` and `DBApply` functions). - Fixed a bug where `DBMap::put()` would return data of a deleted entry. - Removed some unnecessary pointer casts. - Increased `showmsg.c` static buffer size to fit entire DBMap stats report. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15682 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-02-16- Removed outdated version number handling (follow-up to r11503).gepard19841-1/+0
- Fixed mapcache compilation issues in Linux. - Added some missing `svn:ignore` properties. - Moved `BLOCK_SIZE` definition from header to source file. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15586 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-02-13 - Added `libconfig` (configuration file library: ↵gepard19841-14/+10
http://www.hyperrealm.com/libconfig/): - Updated VS9/10 project files. - Updated `configure` & `Makefile`s. - New GM, Commands & Permissions system: - '''This is a backwards compatibility breaking update''', please read tid:58877 - Replaced GM levels with Player Groups. - Commands permissions & other privileges now depend on group, not GM level. - `@help` command improvements: requires "commandname" param and shows more detailed info about commands. - Modified GM whisper system to deliver messages basing on permissions, not GM level. - Remote trade request is now possible only if player is allowed to use `@trade` command as well. - Added a proper permission to use `/changemaptype` command. - `clif_displaymessage` is now capable of displaying multiline messages. - All `ACMD_FUNC`s are static now, and the only way to invoke them is with `is_atcommand()`; all client commands (starting with `/`) are now translated into corresponding atcommands (with exception of `/kick` used on monster, as there is no atcommand to kill single monster). - Removed nonsense "bot check" triggering when player blocked (`/ex`) Server. - Merged `@monster`, `@monsterbig` and `@monstersmall`. - Improved flow of atcommand execution to avoid revealing info about online players or existing commands to non-privileged players. - Merged `atcommand` and `charcommand` script functions (`charcommand` is aliased to `atcommand`). - Fixed `atcommand` script function reading unknown memory area (possible access violation). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15572 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-01-30- Removed more trailing tabs.brianluau1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15527 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-01-20Merged TXT removal branch back to trunk.gepard19841-5/+0
* TXT save engine is removed and no longer supported. * See also tid:53926, tid:57717. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15503 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-01-17Enabled Mersenne Twister MT19937 as random number generator instead of ↵gepard19841-4/+5
standard `rand()` function (follow-up to r14865, r14870). - It fixes issues caused by RAND_MAX being only 32k in Windows system (bugreport:1927, bugreport:86). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15483 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-12-25Added a new login server config for _F/_M account creation method which ↵shennetsind1-0/+6
denies an account creation if either userid or password length is lower than 4 (should be used with conjunction of Disable 4 LetterUserID/Disable 4 LetterPassword client diffs) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15265 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-06-30Replaced custom type 'intptr' with standard 'intptr_t'.ultramage1-4/+4
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14873 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-06-16* Merges from charmerge:flaviojs1-24/+98
- Added DBMap::exists. (r14090) - Added sv_parse_next, a stepped version of sv_parse (delim-separated parser). (r14100 r14104) - Added missing fd check to do_close. (r14145) - Normalized, refactored and restructured some code (in preparation for shutdown/reconnect code). (r14145 r14150) - Changed the char select request code to allow the char-server to reject it. (player in map-server trying to go to char select) (r14150) - Added shutdown support to the servers. (incomplete) (r14152) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14851 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-02-08* Added support for new delayed character deletion.ai4rei1-2/+5
- Asks for birth date associated with the account and has a waiting time of 24 hours by default (setting). - For SQL apply upgrade_svn14700.sql to upgrade table `char`; for TXT no action is necessary, as it upgrades itself. - This completes support for clients 2010-08-03aRagexeRE and later. * Updated login sql engine version, missed during `birthdate` addition (follow up to r14672). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14700 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-01-14* Added 'birthdate' field to account data. For SQL apply ↵ai4rei1-0/+1
upgrade_svn14672.sql to upgrade table `login`; for TXT no action is necessary, as it upgrades itself. - Control panel developers are encouraged to enable players to modify this value, as it is required for new character deletion (2010-08-03aRagexeRE and later, not yet implemented). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14672 54d463be-8e91-2dee-dedb-b68131a5f0ec