summaryrefslogtreecommitdiff
path: root/src/login/account_sql.c
AgeCommit message (Collapse)AuthorFilesLines
2016-03-20Changed buffer argument of SQL->StmtBindParam() to constHaru1-31/+31
Parameters are supposed to be read-only Signed-off-by: Haru <haru@dotalux.com>
2016-03-20Removed unnecessary typedefs from sql.hHaru1-14/+17
- Sql -> struct Sql - SqlStmt -> struct SqlStmt - SqlDataType -> enum SqlDataType This is expected to improve compile time, by removing #include cycles (and forward declaring instead) Signed-off-by: Haru <haru@dotalux.com>
2016-02-24Removed several unnecessary explicit casts of the WFIFOP resultHaru1-3/+3
Signed-off-by: Haru <haru@dotalux.com>
2016-02-24Removed several unnecessary RFIFOP typecastsHaru1-2/+2
- While this is arguable, those explicit typecasts are potentially dangerous/misleading (for example, a const specifier might get accidentally dropped without even generating a compiler warning, or a variable type might change during code changes, and any related warning would get silenced by the explicit typecast). - As a reminder Hercules is written in C, and not in C++ (and there's no such thing as "compiling in C++ mode" - they're two different languages.) As such, it is legal to let the compiler automatically promote void* from/to any non-const pointer type, as well as const void* from/to any const pointer type. Signed-off-by: Haru <haru@dotalux.com>
2016-02-19Fix all known warnings from compiler flags -Wformat*Andrei Karas1-1/+1
Add all missing -Wformat flags into configure.
2015-12-22Ensured 32+1 bytes for all buffers that hold variable namesHaru1-5/+7
Related: #865, #866, #867 Signed-off-by: Haru <haru@dotalux.com>
2015-12-15Added GPL-compliant header to all sources and build scriptsHaru1-4/+20
Signed-off-by: Haru <haru@dotalux.com>
2015-10-19rename malloc.c/h to memmgr.Andrei Karas1-1/+1
2015-07-12Add missing checks to account_sql.c.Andrei Karas1-4/+8
2015-06-19Cleaned up some #includesHaru1-2/+1
Signed-off-by: Haru <haru@dotalux.com>
2015-06-19Removed ".." from include directivesHaru1-11/+11
- Include directives are now directory-independent. - This will allow building plugins from other directories in future. Signed-off-by: Haru <haru@dotalux.com>
2015-04-09Add checks to account_sql.cAndrei Karas1-9/+38
2015-01-20Minor fixes and tweaks suggested by cppcheckHaru1-3/+3
- 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>
2014-11-16Whitespace cleanup (no code changes)Haru1-42/+37
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-10-31Merge pull request #378 from HerculesWS/hpmupdatesHaruna1-5/+5
Char and login server preliminary support for the HPM system
2014-10-28Added preliminary support for login and char server in the HPMDataCheckHaru1-5/+5
- Special thanks to Ind Signed-off-by: Haru <haru@dotalux.com>
2014-10-18Increase sql password field size from 32 to 100 chars.Andrei Karas1-2/+2
32 chars is very small for password.
2014-05-30Fixed typos inside src/Shido1-1/+1
2014-05-10Re-commit of "Fixed order of includes in all source files"Haru1-6/+11
This reverts commit 94657284973f4037596bae468ebfbee5c217e02b.
2014-05-10Revert "Fixed order of includes in all source files"panikon1-11/+6
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 filesHaru1-6/+11
- 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-01-11Hercules 1st 2014 MegaPatchshennetsind1-58/+213
http://hercules.ws/board/topic/3886-hercules-1st-2014-megapatch/ Signed-off-by: shennetsind <ind@henn.et>
2013-12-17Fixed several compiler warningsHaru1-4/+3
- 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-08-08HPM Updateshennetsind1-1/+2
- 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-08Fixed compiling errors when CONSOLE_PARSE was disabledshennetsind1-0/+2
Special Thanks to quesoph for bringing this to our attention. Signed-off-by: shennetsind <ind@henn.et>
2013-07-08Cygwin Fix for the Hercules SQL Update Checkshennetsind1-0/+2
Also modified the output (i think its sightly improved), also added a console command to skip updates so no need to go add the query yourself 'sql update skip <file name>' Signed-off-by: shennetsind <ind@henn.et>
2013-06-10Added SqlStmt functions to the SQL interfaceSusu1-41/+41
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-15HPM Updateshennetsind1-57/+58
Made SQL and strlib functions HPM-friendly, special thanks to Yommy for bringing the issue up. Added partial map.c support, for the all-handy map[] array, beware that soon the whole map.c renewal design will be commit and when that happens your usage of map.c functions in plugins might require some updates. Signed-off-by: shennetsind <ind@henn.et>
2013-04-25Fixed Bug #7189shennetsind1-1/+1
http://hercules.ws/board/tracker/issue-7189-warning-while-recompiling-using-centos5/ Signed-off-by: shennetsind <ind@henn.et>
2013-03-11Follow up d2d734ce0983fbed72e69f555f57f29de04f30b3shennetsind1-4/+2
Special Thanks to Euphy and his hawk eyes. Signed-off-by: shennetsind <ind@henn.et>
2013-03-09Hercules Renewal'd Pin Codeshennetsind1-4/+10
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-3/+6
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-1/+1
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-14Introducing MySQL DB Update Checkershennetsind1-0/+4
First version. Signed-off-by: shennetsind <ind@henn.et>
2012-12-05- Undid r16968: SVN Replaced with source:/trunk/src/@16966 (tid:74924).brianluau1-543/+580
[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-580/+543
Removed /SAFESEH option from MSVC11 projects. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16968 54d463be-8e91-2dee-dedb-b68131a5f0ec
2012-02-13 - Added `libconfig` (configuration file library: ↵gepard19841-6/+6
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
2011-02-08* Added support for new delayed character deletion.ai4rei1-1/+1
- 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-3/+6
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
2008-08-19* Added global sql settings 'sql.*' to inter_athena.conf.FlavioJS1-86/+185
* Made account, ipban and loginlog use the global sql settings when the hostname is empty. * Commented 'ipban.sql.*' and 'account.sql.*' so they default to the global settings. * Removed deprecated settings 'case_sensitive' and 'add_to_unlimited_account' from in login_athena.conf. * Made inter_athena.conf be imported from login_athena.conf instead of being handled separate. * Changed ipban to get the failed login attempts of an ip from loginlog (respects if loginlog is enabled or not). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13092 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-07-27* Fixed a memory leak in mmo_auth_tosql (extra sql statement being allocated).FlavioJS1-1/+0
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13002 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-07-27* Added missing option 'log_db_db' to loginlog_config_read(loginlog_sql.c).FlavioJS1-0/+1
* Fixed a memory leak in account_db_sql_destroy. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13001 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-07-26Merged the /loginmerge branch (topic:192754)ultramage1-0/+578
* the login server storage, ipban and logging systems have been abstracted and now provide a common interface; the rest has been merged into a single login server core (no more login/login_sql duplicity) * storage systems are now added via compiler options (WITH_SQL / WITH_TXT) * multiple storage engines can be compiled in at the same time, and the config option account.engine defines which one will be used. * due to MySQL autoincrement limitations, accounts with id '0' will not be supported; account IDs from this point on should start from '1'. * login_log() functions now again record IP addresses in dotted format, not as 4-byte integers (undo from r6868). * removed config options that defined column names in the login table * removed `memo` and `error message` columns from login db/savefile * moved `loginlog` table to the logs database * added sql files upgrade_svn12975.sql and upgrade_svn12975_log.sql * due to changes to the login table layout, I added an !optional! sql file (upgrade_svn12975_view.sql) that will provide a certain degree of backwards compatibility with existing software; read the instructions inside carefully! * moved third-party includes/libs to a separate directory * updated project files / makefiles Changed the way GM levels are handled * removed conf/gm_account.txt * added the gm level column to the txt savefile (after 'email' column) * gm level information is now transferred along with account data For open problems see bugreport:1889. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13000 54d463be-8e91-2dee-dedb-b68131a5f0ec