summaryrefslogtreecommitdiff
path: root/src/char_sql/char.c
AgeCommit message (Collapse)AuthorFilesLines
2008-03-25Added proper checks to adoption processing (followup to r12428).ultramage1-7/+13
Cleaned up some code / fixed some typos. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12432 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-03-16- Added support for offline divorce.zephyrus1-14/+30
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12379 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-03-16- Added De-adopt support when deleting a baby.zephyrus1-2/+21
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12377 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-03-16- Optimized a little bit char deletion process with partner info.zephyrus1-28/+15
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12375 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-03-03- Merged mail system to Stable. Need a second check... please wait.zephyrus1-0/+3
- No packet added until everything is done. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12287 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-02-17- Updated Eye of Hellion to use the new format of the input command.skotlex1-1/+1
- corrected login_fd/char_fd being uninitialized in the char servers. - Changed a bit around how status_base_atk works to avoid overflows. - Added a check to prevent using consume-delay items when you cannot use skills, since that opens an exploit if the item also has non-skill-casting components to its script. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12214 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-02-12Fixed SQL charserver not logging char deletion correctly (see bugreport:944)ultramage1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12197 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-02-01Fixed sql charserver crashing when mapserver is disconnected and someone ↵ultramage1-1/+1
does a double login (bugreport:870) - it was a typo in r11410 git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12159 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-01-10Another round of login server cleaningultramage1-5/+0
* fixed passwordencrypt on SQL not behaving correctly (since r10753) * corrected some column lengths in the login db (username, password,...) * fixed some places which used wfifo without first reallocating it * removed interserver packet 0x7532 (Request to end connection), as there was no code that actually sent this packet * moved RFIFOSKIP actions to execute as soon as possible git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12043 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-01-08Added missing session auth checks to charserver.ultramage1-7/+14
Packets from non-authed clients will now be discarded. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12034 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-01-06Modified showmsg code to not attach a timestamp to MSG_NONE-type messages, ↵ultramage1-12/+9
generated by ShowMessage(). It now works exactly like printf(). Removed/replaced all printf calls in the code. Added a new flag to setting 'console_silent', for filtering debug messages. Silenced the "Broken pipe found" and "Server running in debug mode" messages. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12020 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-28* Fixed a memory leak in memitemdata_to_sql.FlavioJS1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11989 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-18minor code tweakingultramage1-2/+4
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11936 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-12-17* Added flag.server to indicate interserver socketsultramage1-8/+8
- replaces the previous way (setting 'client_addr' to 0) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11930 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-27* TXT/SQL login server code synchronizationultramage1-31/+25
- exported several core structures to login.h - split off ladmin communication code from the TXT login server - removed all occurences of login_log(); a unified function should be added when SQL's loginlog_db logging code gets synced with TXT - removed conf setting login_log_filename - fixed ladmin getting timeouts since the ping system was changed - removed login/char server_fd[] arrays, added server[].fd instead git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11826 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-27Removed some unneccessary charserver code.ultramage1-15/+13
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11825 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-27- Corrected the online_data_cleanup routine setting offline characters that ↵skotlex1-0/+2
are still connected to the char-server. - Added a check in script command sc_end to properly end infinte endure - ASC_BREAKER no longer triggers status effect cards. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11817 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-21Removed one duplicit sql operation when saving items (bugreport:459)ultramage1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11768 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-18- Implemented a small change that was long overdue: Displaying the ↵skotlex1-21/+79
char-select screen now uses a single SQL query instead of up to 9. - Fixed a bug in the update to prevent setting cell types on unwalkable cells. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11757 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-18- setting npc cells will no longer work on non-walkable tiles (since you ↵skotlex1-1/+1
could do this to override cell types and make unwalkable cells walkable again, for example). - Small fix in the char-server accept code. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11755 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-11Fixed a missing include/export, and typos in the previous revision.ultramage1-1/+1
Corrected wrong length values in one charserver packet. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11714 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-10Fixed some more gcc incompatibilities...ultramage1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11706 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-09* Re-worked the login-char-map packet spam mechanismultramage1-36/+76
- mapserver no longer sends entire user list to charserver every 10 seconds; similar change done to the char-login connection - user count updates are only sent when the value actually changes instead of servers polling each other every few seconds - the servers now prevent interserver connection timeout explicitly by sending ping/ack packet pairs instead of relying on the usercount polling to do so; keepalive is sent every 'stall_time'-2 seconds - removed the @refreshonline command as refresh happens automatically every 5 seconds git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11703 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-08* Changed EXIT_SUCCESS back to 0 in console.c to avoid an unnecessary include.FlavioJS1-4/+5
* Fixed gm_account_db not being deallocated in login-converter.c. * Refactoring names and documentation in db.h/db.c: - changed 'struct dbt' to 'struct DBMap' and 'DB' to 'DBMap*' - changed 'struct db' to 'struct DBMap_impl' and 'DB_impl' to 'DBMap_impl*' - changed COUNT to DB_COUNTSTAT and made it's existence not depend on DB_ENABLE_STATS - removed some @see links and corrected small typos in the documentation git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11698 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-08Synced the charservers' init procedure.ultramage1-12/+7
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11697 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-08Synced charserver char creation creation codeultramage1-119/+101
* removed most of the creation failure messages printed to console * fixed sql charserver letting you use control chars in char names * new chars will not start with the 'Knife' and 'Cotton Shirt' equipped anymore (charserver blindly placed magic values into the equip field) Fixed a glitch where all packets immediately after the map->char login packet would get discarded and the mapserver disconnected. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11696 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-11-02AGAIN corrected the sql charserver query that broke TXT->SQL conversion ↵ultramage1-2/+2
(fixed in r10835, reverted in 11245...) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11642 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-27* Fixed TXT charserver doing periodic random-sized memory allocation ↵ultramage1-16/+18
(bugreport:312) * Set 'Create Converter's produce success rate to 100% (bugreport:302) * Added check that verifies weapon/ammo/state requirements also when casting finishes (might have unwanted side-effects tho'!) (bugreport:228) * Fixed Firewall knocking back undead/fire element mobs (bug in r11578) * Added dummy 'openmail' to txt server to fix a script error message git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11585 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-24* Cleaned up some messy guild code (more to come)ultramage1-7/+7
* Cleaned up the mail code, no more pointless dynamic allocation * Added upgrade_svn11548.sql to convert the mail table to new format * Updated vs7 and vs6 project files * Increased the max. send buffer size to 5M since 1M is not enough * Please complain if something stops working ^^; git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11571 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-22- Added the new mail system. Requires optimization and tests.zephyrus1-0/+3
- Updated the maildb sql structure. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11548 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-20Fixed a nasty bug from r11410 which let people create chars with already ↵ultramage1-11/+11
taken char names, and (in TXT's case) even cause a crash. Closes bugreport:234. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11530 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-17* Merged do_sendrecv() and do_parse() into do_sockets()ultramage1-1/+3
* Fixed subnet check message displaying incorrect ip addresses * client_addr will now be properly set to 0 for server connections * Removed socket code that attempts to cope with code bugs at runtime * Removed outdated copyright and version number from startup logo git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11503 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-14Fixed charsrever crashes, caused by r11410ultramage1-1/+0
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11466 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-12* Fixed wrong index calculation in TXT char creation code (ref: r11410)ultramage1-1/+1
* Fixed SQL itemdb loading crash on NULL columns (ref: 11398) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11434 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-11Charserver cleaning / code simplification.ultramage1-347/+220
Removed min. 4-letter restriction on char creation name length (but still must be longer than 0). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11410 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-07- Ops!.zephyrus1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11379 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-07- Bug ID #184: Char Creation With An Empty Name [Zephyrus]zephyrus1-0/+7
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11377 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-10-04* Added MAX_HOTKEYS to supplement the HOTKEY_SAVING defineultramage1-2/+3
* Fixed a compile problem when hotkey saving is disabled (topic:167265) * Added script source error reporting to countitem() (topic:167165) * Removed integer mob skill state/target definition support (unused) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11353 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-30Removed redundant 'subnet' s_subnet structure variable.ultramage1-34/+12
Removed duplicate code from the sql charserver that somehow appeared after the tmpsql merge. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11333 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-28* Changed back the query to get the friends of a character to a LEFT JOIN.FlavioJS1-1/+1
* Setting the item script variables to NULL when they are freed. (bugreport:142 ?) (a double @reloaditemdb might result in a double free) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11328 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-28Removed some redundant code from the sql charserver.ultramage1-98/+73
Fixed a sql-charserver @block crash (missing Sql_NextRow() call). Probably fixed 'random junk' being displayed in @changesex reply text. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11324 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-27* Reimplemented mmo_char_fromsql using sql statements. (fixes bugreport:93)FlavioJS1-139/+171
* Fixed buildin_gethominfo not being included in the script engine. (bugreport:124) * homunculus_evolution -> homevolution in script_commands.txt. * Deleted item DEFAULT from item_db.txt and regenerated item_db.sql. (bugreport:103) * Skip empty lines and give more feedback (for invalid lines) when reading item_db.txt/item_db2.txt. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11311 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-22Fixed a severe bug in inventory saving code (caused by r11192).ultramage1-58/+46
The fix was to revert the changes; I totally misunderstood how it was supposed to work... git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11275 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-21* Fixed a typo in the status-change saving code (wrong variable used)ultramage1-1/+1
* Fixed a case of bad sql code conversion breaking homun skill loading git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11264 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-20Added back SQL charserver listening socket code that got removed in the ↵ultramage1-0/+4
/tmpsql merge. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11251 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-20* Merged the tmpsql branch:FlavioJS1-1245/+968
- Abstraction for the sql code (sql.c/h). - New configure script and makefiles. - Restored txt zeny logging code. (r10814) - Rewrote mapserver's sql code - itemdb, mobdb, mapreg, logs. (r10814) - Fixed a precedence issue (&& and ) in char_sql/char.c. (r10833) - Improved db reading code a bit for consistency. (r11077) - Added separate atcommand for mail deletion. (r11077) - Corrected a few messages that said "new" instead of "unread". (r11077) - Broadcast (*) messages now use "*" as the target's name (not ""). (r11077) - Moved StringBuf code from utils.c/h to strlib.c/h. (r11084 r11117) - Some misc login server cleanups (reformatting etc). (r11136) - Corrected/modified some header entries. (r11141 r11147 11148) - Adjusted VS project files. (r11147) - Adjusted the way the sql charserver does item saving. (r11192) - Corrected usage of reserved keyword 'friend' in mmo.h. (r11192) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11245 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-09-13Wiped out every mention of RETCODE from /src.ultramage1-3/+3
The servers no longer save data using CRCRLF as line terminator on Windows. Closes bugreport:45. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11187 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-16- Cleaned some more the hotkey code: The order by and limit specifications ↵skotlex1-2/+11
are not really needed when loading hotkeys, and added hotkey deletion when you delete the character. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11022 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-15- Merged and completed Latio's work on server-side hot-key saving ↵skotlex1-1/+48
(http://www.eathena.ws/board/index.php?s=&showtopic=159388&view=findpost&p=884453) - Now hotkeys are stored server-side (table hotkey in SQL servers, file save/hotkeys.txt for TXT servers). You can disable this behaviour by commenting out the 'HOTKEY_SAVING' define in mmo.h - Fixed a few compilation warnings/errors. - Apply upgrade_svn11018.sql to create the hotkey table. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11019 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-08-09The new functions now clear junk from the output buffer, this simplifies the ↵ultramage1-1/+1
code a bit. Added a TODO for one emblem loading problem/crash. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10969 54d463be-8e91-2dee-dedb-b68131a5f0ec