summaryrefslogtreecommitdiff
path: root/src/char/char.c
AgeCommit message (Collapse)AuthorFilesLines
2011-01-13* Removed ladmin (remote administration tool), all related support code and ↵ai4rei1-130/+0
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* Reformatting and minor cleanups to console-plugin related code.ai4rei1-19/+9
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14664 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-29* Fixed char-server making assumptions about RFIFO data length in character ↵ai4rei1-1/+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-25* Fixed a compile error in txt-converter-char caused by 'save_log' being ↵ai4rei1-3/+1
declared by both SQL and TXT (bugreport:4671, since r14619). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14622 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-25* Made SQL char-server options 'chars_per_account' and 'char_del_level' work ↵ai4rei1-0/+26
on TXT as well (follow up to r1063 and r8420). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14621 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-25* Synchronized TXT/SQL char-server code a bit.ai4rei1-118/+160
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14619 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-24* Fixes to char-server.ai4rei1-54/+40
- Removed unnecessary #includes from TXT and synchronized them with SQL. - Fixed TXT having start Zeny of 500 instead of 0 by default (follow up to r4409 and r8420). - Fixed TXT using 1024 instead of NAME_LENGTH for 'unknown_char_name' (follow up to r2191). - Fixed SQL potentionally attempting to disconnect a player for account_id == 0 in changesex packet. - Fixed SQL looking for option 'db_path' in 'inter_athena.conf' instead of 'char_athena.conf'. - Fixed char select not sending a reply packet, when selected character was not found. - Made use of safestrncpy instead of strcpy, strncpy and memset for copying strings where appropriate. - Removed unused function 'chardb_final' in TXT (since r4878). - Removed unnecessary WFIFOHEAD in char deletion in SQL (since r11245, related r9307 and r10909). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14618 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-18* Updates to handling of hair color/style and cloth color of characters.ai4rei1-2/+0
- Moved limit shortcut defines from mmo.h to battle.h, as they are only required in files, which include battle.h (since pre-svn 2004/10/15). - Moved hair style/color validation from char-server to map-server. This enables use of non-default limits as specified in battle config, rather than being restricted to hard-coded ones (bugreport:150). - Cleaned up related capping of values in pc_changelook (related r1708). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14604 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-18* Fixed usage of literals for map name length in character list packet ↵ai4rei1-1/+1
(since r14368). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14603 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-12* Updates to dynamic server information `ragsrvinfo` on SQL.ai4rei1-2/+2
- Fixed exp and drop rates (int) getting truncated (short) when sent to char-server. - Removed `motd` from `ragsrvinfo` as it is not dynamically changed by the server and as such can be read by 3rd party applications directly from conf/motd.txt if required. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14579 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-12-07* Reverted r14563, due to multiple issues which render the source ↵ai4rei1-16/+16
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-16/+16
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14563 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-11-19* Fixed WFIFOL being used instead of WFIFOW for a short field of packet ↵ai4rei1-1/+1
0x2710 (bugreport:2819). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14468 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-11-02Applied fix by Ai4rei to reintroduce mapName within charinfo packet when ↵Paradox924X1-1/+1
PACKETVER >= 20100803. Follow-up to r14432. (bugreport:4413) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14440 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-10-17Fixed wrong char info packet size for clients after 2010-07-27 (follow-up to ↵Gepard1-1/+1
r14368). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14432 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-08-03- Merged a few minor bugfixesSkotlex1-3/+7
- Merged in a bunch of the eA renewal support patch. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14368 54d463be-8e91-2dee-dedb-b68131a5f0ec
2010-04-23Merged a few updates for supporting renewal clients (thanks to Diablo): ↵skotlex1-3/+11
[Skotlex] - Updated packet_db entries - Added slot info on packet 0x6b (PACKETVER > 20100413) - Trade add-item use packet 0x80f (PACKETVER > 20100223) - Guild storage add-item use packet 0x1c4 (PACKETVER > 20090603) - Vending list use packet 0x800 (PACKETVER > 20100105) - Allow client to change item-share party settings (PACKETVER > 20090603) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14286 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-12-03Prevented online user count from going negative. (bugreport:3913)Paradox924X1-2/+4
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14186 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-11-19- Applied the renewal client support patch from Diablo (eA forum topic 222623)skotlex1-11/+42
- Added support for strcharinfo(3) to retrieve the player's map - Added script command "searchitem" for name item searches. - Moved PACKETVER to src/common/mmo.h as it's needed by the char-server now - Changed the status valX from int to long so that it won't break for pointer-storage in other architectures. - Moved the change party leader code to party.c - A few bugfixes or packet field completions based on my past experience messing around with my server. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14155 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-10-18Removed the char_rename setting in favor of a PACKETVER define.ultramage1-9/+8
Inverted the way renames are counted: '0' now means 'no renames left' (the default). Please make sure your database matches this new behavior before starting the server. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14093 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-10-15Ported over several TXT online code fixes from charmerge (autotrading chars ↵ultramage1-14/+35
couldn't be kicked due to a missing update). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14091 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-09-20Disabled ip checking during auth, since it lead to a lot of confusion.ultramage1-4/+4
This essentially reverts the default behavior to before r10021. Re-enabling should only be reconsidered after the subnet mechanism is made fully automatic. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14069 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-07-11Some insignificant code tweaks.ultramage1-2/+5
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13945 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-04-01* Removed online_check config options. (always active now)FlavioJS1-48/+53
* Clarified char_maintenance config option. * Changed packet 0x2712. (added request_id) * Changed packet 0x2713. (added sex, request_id, version, clienttype; removed email, expiration time, gmlevel) * Delayed user count check and mmo_char_send006b to when the account data arrives. * Created auxiliary function MD5_Salt. (split from a future commit that was getting to big for my taste) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13652 54d463be-8e91-2dee-dedb-b68131a5f0ec
2009-02-20Increased variable size for status/skill points to remove the 65k cap ↵ultramage1-11/+4
(bugreport:1579). Added sql upgrade script to adjust the appropriate char table columns. This is an enhancement to r5762. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13541 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-11-06* Fixed 'Char creation denied' message not being sent properly.FlavioJS1-1/+1
- Number 2 didn't exist in old clients so it used the default message, now it exists so the wrong message is displayed. - Changed 2 to 0xFF to get the default message. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13356 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-10-15- Added the required changes to support the 2008-09-10+ clientsskotlex1-6/+8
- Cleaned around the char set offline function to properly avoid setting offline a character that had relogged faster than the map server's packet arrival to the char-server (I presume this was the bugfix that Kevin attempted a long time ago, but the current code for that causes a dangling pointer problem). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13293 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-10-11Quick fix to txt charserver initialization order - chardb needs to be ready ↵ultramage1-4/+1
for parties to load correctly. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13275 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-10-03* Fix for "yet another online check bypass technique". (bugreport:2292)FlavioJS1-1/+2
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13256 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-08-18Merged a critical fix to charserver online tracking code (see r13087).ultramage1-1/+1
Corrected wrong variable use in txt charserver online tracking code (mistake in r4726). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13089 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-08-04Fixed an auth bug in txt charserver (caused by r12579, followup to r12609)ultramage1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13042 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-07-30Fixed TXT storage code handling storage incorrectly (bugreport:1928)ultramage1-8/+4
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13016 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-07-26Merged the /loginmerge branch (topic:192754)ultramage1-131/+34
* 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
2008-07-15Corrected wrong data loading order in txt storage code causing crashes at ↵ultramage1-1/+3
startup (followup to r12950). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12957 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-07-13Modified storage data loadingultramage1-0/+6
* storage is now loaded/saved along with character status * as a consequence, a lot of storage handling code was removed * there is no more locking done within storage data * mapservers no longer cache the data (solves muiltimapserver exploit) * loading storage on char select may decrease charserver performance git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12950 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-21* Changed the data field of timers from int to intptr.FlavioJS1-9/+9
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12633 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-21Made some cleanup in changesextoms1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12626 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-16Fixed an issue in r12575 where 'not setting char offline when going from ↵ultramage1-4/+8
mapserver to charserver' also caused a permanent account lockout if the player pressed 'cancel' in the char select screen. Merged some recent changes from SQL to TXT, as someone didn't bother to do it. Ifdefed the quest data request code as SQL-only (this was causing server disconnects whenver someone logged in). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12606 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-14* Followup to r12579 (all other players appeared as female on sql branch).FlavioJS1-0/+2
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12583 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-13* Quick&dirty reversal of the inter-server behaviour introduced in r3255/r3256:FlavioJS1-0/+76
- the behaviour enabled a desynch between the char-server and the map-server - now the map-server asks the char-server to authenticate the auth info (the char-server doesn't send the auth info immediatelly) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12579 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-12TXT code has been re uploaded. Please note this does not change the fact ↵Kevin1-0/+4290
that TXT support has been dropped. There is no guarantee the code base will be managed and it will in the near future be REMOVED. If there is in ANY way TXT support in the future, it will be abstracted through a sql interface so only the sql code has to be maintained. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12572 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-12I live in a giant bucket.Kevin1-4290/+0
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12570 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-11The max_account_id packetver detection mechanism will never cause any ↵ultramage1-19/+0
connection problems ever again. (bugreport:388) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12563 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-10Modified the charservers to use a DBMap instead of a cyclic array for auth data.ultramage1-291/+309
Merged the auth fix from r12473 to TXT as well. Removed the no-op from r12547. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12551 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-04-03Renamed 'connect_until_time' to 'expiration_time'.ultramage1-10/+10
Renamed 'ban_until_time' to 'unban_time'. this also applies to login table columns (see upgrade_svn12464.sql). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12464 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-03-28Some more txt/sql login server synchronization:ultramage1-32/+0
- removed the option to specify multiple IPs/subnets for 'ladminallowip' - removed the @gm command and all associated management code - removed the 'save unknown packets' code - removed the lengthy TXT ipban code (which was essentially a copy of what's already handled by the socket layer/packet_athena.conf) - implemented 'start_limited_time' in SQL (expiration for new accounts) - applied some missing TXT changes from the last update git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12446 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-03-27Partial rewrite of the login server's auth system.ultramage1-9/+18
* replaced the cyclic, size-limited auth_fifo data structure with the more appropriate DBMap-based alternative (stops some erratic behavior) * added code to simulate the pseudo-status "online on login server" * auth data will now expire after 30 seconds instead of persisting * better-than-aegis handling of login cancellation (the server will wipe all previous auth data instead of making you wait for it to expire) * proper status message - no more generic "rejected from server", now you'll get "the server still recognizes your last connection" * fixed a typo in r10110 which caused disconnect timer removal to fail * split off some parsing code to login_auth_ok() and login_auth_failed() * extended the auth confirmation packet so that the login_id1/2 values are sent along with the associated account id (stops charserver from making wrong choices if two incoming sessions have the same account id) * fixed a bug in the disconnect part of the main charserver parsing loop, where a non-authed client would erase the online db entry for a client that's already online, thus bypassing any dual-login checks * added code to stop the waiting_disconnect timer when the associated online entry is removed right away, instead of doing checks later * removed code that would periodically wipe the online status of clients that are in the auth process (producing yet more erratic behavior) * commented out some TXT-only reconnect prevention code (bugreport:1281) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12441 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-03-27merged the charserver acc modification code cleanup to TXT (r11324)ultramage1-88/+76
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12440 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-03-26Adjusted eAthena code to compile cleanly in C++ mode.ultramage1-19/+19
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12436 54d463be-8e91-2dee-dedb-b68131a5f0ec
2008-03-25Added proper checks to adoption processing (followup to r12428).ultramage1-10/+16
Cleaned up some code / fixed some typos. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12432 54d463be-8e91-2dee-dedb-b68131a5f0ec