summaryrefslogtreecommitdiff
path: root/src/common
AgeCommit message (Collapse)AuthorFilesLines
2007-03-04- Removed delete_session from socket.h since it shouldn't be used by them.skotlex2-2/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9955 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-03-04More tweaks to socket.c to simplify the codeultramage2-108/+61
- many generic cleanups - reformatting, useless code removal, etc - made the mode_neg setting a compile-time decision, not a run-time one - removed the silly frame_size setting (there since r1) - added some TODOs to http://www.eathena.ws/board/index.php?showtopic=127988 git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9954 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-28- Made it possible to modify the server packet version from the Makefile.skotlex1-1/+3
- Merged packet 2b22 (from my server) to handle quick fame updates whenever someone's fame in the ranking changes, but no position swaps take place (prevents having to resend the whole fame list in such events, you lazy Draco <.<) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9936 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-21Applied a consistent look to all header files (copyright, ifdefs)ultramage19-24/+34
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9891 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-21Minor stuff (typos, socket.c, junk in login reply packet)ultramage1-21/+8
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9886 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-15- The default packet version is now 8. Clients from November2006 and before ↵skotlex1-1/+1
can no longer get past the char-server unless you change it back to 7. - Fixed Storm Gust counter freezing on fourth hit instead of third. - Fixed @homstats not taking into consideration that the stat growth decimals get discarded on level up (so the real minimum/maximum displayed was off). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9868 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-08- Fixed the new socket code, which was triggering the inactivity timeout on ↵ultramage3-6/+5
the servers' listening sockets - Fixed the TURBO code not working since r4468 (parse func never called) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9826 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-08* More aggressive cleaning up of the socket codeultramage2-154/+124
- removed unused session_data2 entry in sd - added a new create_session() function, helps keep things cleaner (although it's ad-hoc and not perfect, since this is C) - undid r4978 since it was getting in the way (re-add it if you need it) - added defines for the recv, send and parse func pointers - added null functions for the three actions, and made create_session() calls use those instead of NULL pointers; insignificant penalty and now: - since all three funcs are always initialized, removed all those NULL checks - removed the efd set, since as the people from the developernet forums pointed out, it's only for out-of-band data and NOT for error checking (in fact, select() bails out without giving any info if it errors out) - reorganized the randomly placed socket.c contents somewhat git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9822 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-07Wiped out the poorly written parse code from r2211ultramage3-52/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9819 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-07Cleaning up of the socket codeultramage3-66/+40
- Shuffled includes around for files that were leeching off of socket.h - Added code that enforces standard shutdown behavior for sockets git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9817 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-07- Removed deprecated console code.FlavioJS2-61/+3
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9815 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-01Added string function strnlenultramage2-0/+15
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9761 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-02-01Removed graph, httpd and webserverultramage4-350/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9757 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-01-28Some misc cleanups (typos, formatting, forgotten changelog entry etc)ultramage1-7/+0
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9733 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-01-26- Added a wrapper to delete_timer so it prints out from where the invocation ↵skotlex4-5/+10
was done. - Fixed some unsigned warnings. - Fixed Splash attacks consuming 2 ammo on each attack. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9718 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-01-23- Added view_data support to mercenary.*, so that the Homunculus entries are ↵skotlex1-1/+1
no longer required on the mob_db. - Removed homunculus entries from mob_db. - Added the status icon to NPC_CHANGEUNDEAD and the Flee/Hit foods - Corrected the check that lets you walk when vending/chatting/etc. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9697 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-01-21Typo huntultramage1-3/+3
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9684 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-01-12yup, i need to rest... (also, copy-paste is eeeevil)FlavioJS2-4/+4
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9649 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-01-12 upsFlavioJS1-1/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9648 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-01-12- Cleaned up the ip rules/DDoS section of the code. (the allow,deny and ↵FlavioJS2-177/+205
deny,allow cases were switched) - Updated the information about ip rules and DDoS protection in packet_athena.conf and commented out the line "allow: all" so connections are rejected when a DDoS is detected. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9647 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-01-09- Changes to script buildin functions:FlavioJS1-1/+1
* functions checking if a player is attached as soon as possible. * functions that required a player attached and would crash if none was there terminate the script now. (others keep the current behaviour to maintain full backward compatibility) * removed the unused flag argument in guildskill. * bonus,bonus2,bonus3,bonus4 use the same function now (remains the same script-wise) * added an optional parameter to setcart,setfalcon,setriding so it's possible to remove the cart/falcon/mount or select a specific cart * other cleanups git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9636 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-01-08Unimportant cleanupsultramage2-11/+5
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9633 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-01-08* Silenced the plugin export messages during startup [ultramage]ultramage2-2/+2
* Fixed an old debug message displaying %d instead of a number * Commented out a login_log call (sql doesn't implement that function!) * Found the reason why the console didn't want to run on windows * Moved the plugin.def file to the plugins dir and added console.def git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9632 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-01-08- Added a precompiler error when the shutdown defines are not found.FlavioJS6-190/+285
- Added parse_console to the plugin API. - Added plugin for parsing the console. (working with cygwin) - Added the console plugin to plugin_athena.conf commented out. - Copied the parse_console code form login txt to login sql and char. - Added propper plugin version compatibility tests. - Better output when a plugin fails to load. ----- The console plugin (at it's 3rd version) uses two pipes and another thread. - the other thread reads data from stdin and sends it through one of the pipes - the other pipe serves as semaphore (and terminator) to that thread - the normal thread checks if the pipe has data once every timer cycle, if data is found it invokes parse_console with that data Worth noting: the first version didn't use another thread and just checked if data was available on the input stream, but apparently that can't be done to standard input in windows It's only been tested on cygwin (and should work on most *nix systems), can't test native windows right now because I'm having trouble exporting the required plugin variables in VS8 src/plugins/Makefile hasn't been updated because it's not working properly for me git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9631 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-01-07- Fixed the sleep timers not being removed when the an npc was being ↵FlavioJS1-1/+3
unloaded and when reloading scripts. Ref: http://www.eathena.ws/board/index.php?showtopic=131464 git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9629 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-01-07Undid the memset->malloc_set replacementultramage9-78/+16
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9626 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-01-06- Now winsock 2 is required.FlavioJS2-88/+126
- Cleaned up do_close and socket_init a bit. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9621 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-01-05- Major reconfiguration of the trunk VS8 project files, read the changelog ↵ultramage2-99/+0
for details - Also removed some deprecated code that was causing linking conflicts - And fixed a missing md5calc reference in stable's VS8 files git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9619 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-01-04- Updated /doc from jAthenaultramage2-2/+1
- Completed adding of the new cities to @go > that function is ugly and needs a complete rewrite, asap - Updated thor volcano warps git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9615 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-01-03- Now the server will by default perform symmetric adding of friendsultramage1-0/+2
- > TODO - symmetric deletion (http://www.eathena.ws/board/index.php?showtopic=130749) - Added a first approximation of warps for the new maps (by $ephiroth) - Added Rachel and Veins to the list of @go destinations git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9613 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-01-03ups... forgot to remove this before committingFlavioJS1-1/+0
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9612 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-01-03- Fixed FIFO defines in TURBO mode.FlavioJS2-5/+8
Ref: http://www.eathena.ws/board/index.php?showtopic=129766 The rest of the TURBO related errors are about the HEAD defines having to be at the start of a block because they contain a variable declaration. (i won't fix these) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9611 54d463be-8e91-2dee-dedb-b68131a5f0ec
2007-01-03- Fixed pc_calc_skilltree ignoring prerequisites / joblvl requirements.ultramage1-2/+2
- Re-applied change r9593 that got accidentally reverted by r9595. - Added the official behavior of monsters regaining full hp when they morph. - Added support for text/comments at the end of monster spawn lines (<tab> required) - Silenced the debug message in socket.c that's been freaking people out. - Modified the useless error message in atcommand_effect. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9608 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-31- Updated getitem and guardian entries in script_commands.txt.FlavioJS1-1/+1
- Fixed getitem trying to get <character ID> from the wrong argument. - Now getitem can be run on scripts without a player attached if <character ID> is specified. - Now the two last arguments of guardian are optional and independant of each other ("<event label>" and <guardian index>). This way the previous implementation and script_commands definition are still valid code. - Now buildin function names and argument definitions are checked for validity before adding the function to the script engine. Argument definitions follow the pattern: (v|s|i|l)*\?*\*? v - value (string or int) s - string i - int l - label ? - one optional parameter * - unknown number of optional parameters git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9599 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-29- Skill use is now cancelled when you use it while cloaking, and the ↵skotlex1-1/+1
uncloaking process warps you. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9591 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-28- Reapplied Skotlex's socket.c changes from r9587 and r9582. :S (sorry)FlavioJS1-7/+19
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9589 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-28- Part 3 of TheUltraMage's socket cleanup.FlavioJS1-46/+36
- Fixed the packet structure in mmo_char_send006b for PACKETVER 8. - Removed search_str from add_str (add_str already searches for the string). - Native script words like do,while,for,... are case insensitive now. - Changed SCRIPT_HASH_SIZE to 1021 (prime hash sizes give better distributions). - Added alternative hash implementations to the script engine (to try out later). removed int_homun.c from header section of the VS8 map project files git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9588 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-28- Added a func_parse invocation when an invalid socket is found, so that the ↵skotlex1-0/+4
underlying code (char/map/login) can handle it and free any related resources. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9587 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-28- Some cleaning in do_sendrecv, added error messages when handling an ↵skotlex1-9/+17
incorrect socket. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9582 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-26- Cleaned up some more the code so it works for -DTURBOskotlex1-1/+1
- Cleaned the pvpoff @ and script commands. - mob_get_random_id now has two additional flags to specify that the monster to acquire should not be a boss type (4) or that it should give exp (8). - TK_MISSION will now pick any mob from the DB as long as it is not a boss type and it gives base exp. - Fixed the double-stone issue when hitting a petrified character. - Minor cleanups git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9573 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-25- Applied part 1 of TheUltraMage's socket cleanup.FlavioJS2-216/+76
"Basically what I did was perform simple one-liner substitutions for ugly repetitive blocks of code. The most apparent are the send/recv code and the other basic socket calls." - flush_fifo is non-blocking now. I guess best effort is good enough... - Copied header files from vcproj-7.1 files to vcproj-8 files. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9570 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-23- Moved "#include <limits.h>" to cbasetypes.h to ensure it's included before ↵FlavioJS2-6/+6
checking if UINT_MAX has been defined. - Minor changes in pc_readdb related to max_level being unsigned. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9561 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-22- Change strncpy to memcpy when parsing switches in the script engine since ↵FlavioJS3-3/+9
it's guaranteed to be a word of that size (skip_word). - Made scriptlabel_db duplicate the key. When str_buf is reallocated, the keys in scriptlabel_db could become invalid, causing a crash in npc_convertlabel_db. ( removed the readded >=0x81 equivalent ) - Now npc_convertlabel_db clears scriptlabel_db after using it. - parse_script has an extra parameter options. At the moment it only indicates if scriptlabel_db should be used or not. - Fixed "UINT_MAX undeclared" on systems that don't declare it in limits.h git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9557 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-21- Added a 1-node cache to db. Removed party_cache and guild_cache since now ↵FlavioJS1-79/+85
the database has a cache. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9545 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-21- Moved md5calc to commonFlavioJS4-60/+305
- Answered Skotlex's question and fixed "warning: comparison is always false due to limited range of data type" by restricting script words to ASCII characters only. - Applied "svn:eol-style native" to makefiles and project files git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9544 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-20- Moved PACKETVER to mmo.h, and added support for the expanded character ↵skotlex1-0/+3
info window on the char-server when PACKETVER is above 7. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9539 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-20- Fixed ISSPACE and ISALPHA casting their returned value to a char. These ↵skotlex1-2/+2
are "bool" functions, and as such return an non-zero int as result, casting them to char just... really messes things up when the returned value is out of the CHAR_MAX/CHAR_MIN range! git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9538 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-20- Changed the script source from unsigned char* to const char*.FlavioJS1-0/+6
- Updated plugins Makefile. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9532 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-20- Fixed the meaning of stdout_with_ansisequence and changed the default ↵FlavioJS1-3/+4
value to no. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9531 54d463be-8e91-2dee-dedb-b68131a5f0ec
2006-12-19- Added missing include of system header limits.h to timer.cskotlex1-2/+1
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9523 54d463be-8e91-2dee-dedb-b68131a5f0ec