summaryrefslogtreecommitdiff
path: root/src/login/login.c
AgeCommit message (Collapse)AuthorFilesLines
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
2011-01-14* Replaced remaining occurences of '-1' with 'INVALID_TIMER', where ↵ai4rei1-10/+10
appropriate (follow up to r12998). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14670 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-01-13* Removed ladmin (remote administration tool), all related support code and ↵ai4rei1-50/+1
the checkversion.pl tool with it's support code, which was shared with ladmin (topic:262934, related bugreport:1147, bugreport:1889, r9408 and r9610). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14667 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-01-13* Added support for creating account through the console-plugin on ↵ai4rei1-0/+30
login-server (replaces ladmin functionality unavailable through atcommands). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14665 54d463be-8e91-2dee-dedb-b68131a5f0ec
2011-01-13* Reformatting and minor cleanups to console-plugin related code.ai4rei1-20/+8
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14664 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-29* Fixed 'console' plugin not working on Windows, due to NULL passed to ↵ai4rei1-1/+1
CreateThread instead of required pointer to thread id variable. - Fixed 'console' plugin causing delete_timer error when it fails to load, due to uninitialized variable. * Renamed plugin.def to sample.def and added 'sample' plugin exports into it, as it's purpose is nothing than a sample right now. - Also added .def files for 'gui' and 'pid' plugins as MSVC does not export everything automatically and missing event export cause the plugins silently failing. - Added VS6, VS8 and VS9 projects for compiling plug-ins, which can be used on Windows. * The plug-in system will now report, if it cannot import an event function. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14638 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-29* Fixed char-server making assumptions about RFIFO data length in character ↵ai4rei1-5/+1
deletion packet (since r10909). * Fixed login-server discarding RFIFO data, when the length is 1 byte; minimum packet size is 2 bytes (since r5027). - Fixed login-server not skipping packet 0x2728's data on failure (since r12043). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14637 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-22* Resolved random compiler warnings.ai4rei1-1/+1
- Silenced pointer size mismatch gcc warning for variables passed to script_setarray_pc (bugreport:4661, since r14613). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14615 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-07* Reverted r14563, due to multiple issues which render the source ↵ai4rei1-3/+3
malfunctioning or uncompilable. To be redone later (bugreport:4627). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14567 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-07Changed almost all instances of sprintf() to snprintf().Paradox924X1-3/+3
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14563 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-11-20* Fixed login-server account engine initialization not getting checked, ↵ai4rei1-6/+10
whether it succeeds or not (bugreport:4361, since r12700, related r13000). - Failure to retrieve account engine and initializing it is now considered fatal and causes the server to exit immediately. - Fixed two data type inconsistencies, while being at it. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14476 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-04-30- Fixed a typo in guildrelay.txt (bugreport:4213)brianluau1-1/+1
- Forced acc.lastlogin to use MySQL DATETIME format. (bugreport:4193) - Fixed the range of getiteminfo and setiteminfo. (bugreport:4190) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14292 54d463be-8e91-2dee-dedb-b68131a5f0ec