2014-10-22 packets thanks to Yommy.
Improved bindatcmd handling of spaces in parameters.

- Parameters passed to bindatcmd-invoked labels are now properly
  space-delimited.
- This is in order to support strings containing multiple spaces or
  containing a trailing space. Previously it was impossible to create a
  bindatcmd command that could accept a player name such as
  'This name has  two spaces' or 'Sir Trailingspace '.
- Added documentation and usage examples, especially wrt space handling.
  See doc/script_commands.txt for details.
- NOTE: Your custom atcommand labels may need edits, as we're no longer
  trimming multiple sequantial spaces or trailing spaces, in order to
  gain more flexibility. It is your care to do that.
- Special thanks to Dastgir, jaBote.

Signed-off-by: Haru <haru@dotalux.com>
Added some validation checks in the geoip parse function

This fixes the warning on some compilers, about the fread return value
being ignored.

Signed-off-by: Haru <haru@dotalux.com>
In configure add option --enable-static

This option enable static build for server binaries and map cache.
For plugins this option enable static linking with gcc.
Merge pull request #347 from 4144/static

In configure add option --enable-static
Fixed an issue with $LIBS in the configure script

- It is now possible to pass custom LIBS values to ./configure by
  specifying them on the command line

Signed-off-by: Haru <haru@dotalux.com>
Added support for other libmysqlclient variants

- This allows Hercules to correctly detect MariaDB and other drop-in
  replacements in distributions that rename their libmysqlclient (i.e.
  Debian / Ubuntu renaming it to libmariadbclient).
- Closes issue #368
- Due to a bug in Ubuntu 14.04 LTS (incorrect output by the
  mariadb-provided version of `mysql_config --libs` and missing
  dependencies of libmariadbclient-dev), users of said distribution will
  have to manually specify ./configure LIBS="-lssl -lcrypto" as well as
  manually install the libssl-dev package, if they wish to use
  libmariadbclient-dev, as it will be unable to link otherwise (note:
  this issue isn't Hercules-specific)
- Special thanks to Andrei Karas

Signed-off-by: Haru <haru@dotalux.com>
Re-commit of 4ac673941714032ada6d26fb60936ec510bbe496 (part 1)

    Some Quality of Life Changes

- getbrokencount command added to get amount of broken equipment.

Signed-off-by: Haru <haru@dotalux.com>
Re-commit of 4ac673941714032ada6d26fb60936ec510bbe496 (part 2)

    Some Quality of Life Changes

- checkquest deprecated; Use questprogress instead for a more logical
  quest log checking command.

Signed-off-by: Haru <haru@dotalux.com>
Restored ability to differentiate between active and inactive quests

- Added the questactive script command.
- While this information may not be needed by official scripts, it was
  offered by the now deprecated checkquest, and as such it is made
  available again.

Signed-off-by: Haru <haru@dotalux.com>
pc_isriding* / pc_setriding* cleanup

- pc_isriding is now renamed to pc_isridingpeco, since that's what it
  checks (to avoid confusion).
- pc_hasmount is added, to check for any of Peco, Dragon, Mado Gear, Wug
  Rider.
- pc->setridingdragon is added.
- pc->setridingwug is added.
- pc->setfalcon type is changed.
- pc->setmadogear type is changed.
- pc->setridign is changed to pc->setridingpeco to avoid confusion.
- Changed direct accesses to sd->sd.option to the proper pc_is*
  accessors, where applicable.
- Special thanks to Kisuka.

Signed-off-by: Haru <haru@dotalux.com>
Renamed ismounting, setmounting, @mount2

To avoid ambiguity:
- The script command ismounting is now hascashmount
- The script command setmounting is now setcashmount
- The at-command @mount2 is now @cashmount

Signed-off-by: Haru <haru@dotalux.com>
Re-commit of 4ac673941714032ada6d26fb60936ec510bbe496 (part 3)

    Some Quality of Life Changes

- setdragon, setmadogear and setriding deprecated; use setmount instead.
- checkdragon, checkmadogear, checkriding deprecated; use checkmount
  instead.

Signed-off-by: Haru <haru@dotalux.com>
HPM Hooks Update

Signed-off-by: HerculesWSAPI <Hercules@efficiently.awesome>
ItemDB SQL Sync

Signed-off-by: HerculesWSAPI <Hercules@efficiently.awesome>
Added some missing variable initializations

- The issue was caused by memcmp failing because of garbage in structs
  padding.
- Fixes bugreport:8410, special thanks (and credits for the fix) to Garr
  http://hercules.ws/board/tracker/issue-8410-autotradeat-issue/
- Also reduced scope of some variables, where appropriate.
- Thanks to Ind.

Signed-off-by: Haru <haru@dotalux.com>
Sight Blaster and other skill fixes, magic reflect, crash, trap display and monster behavior fixes
- Fixed cast time of Sightrasher in pre-renewal (700ms -> 500ms)
- Official Sight Blaster behavior (bugreport:6945, partially bugreport:144)
  * Sight Blaster's AoE is now 3x3 even in pre-renewal (it was originally larger so it hits traps before they trigger)
  * Sight Blaster will now prevent traps from triggering as long as they are knocked back
  * Fixed a bug that caused Sight Blaster to not work on traps and ice walls at all
  * Sight Blaster will no longer expire when the attack was reflected
  * Sight Blaster will now expire when hitting an ice wall
  * Sight Blaster will now properly protect you from being attacked from its AoE range
- Sight, Ruwach and Sight Blaster will now check for a target every 20ms (previously every 250ms)
- Step action will now be canceled when being knocked back (skills won't be executed anymore when knocked out of range)
- When knock back magic is reflected it will no longer lead to the caster being knocked back (related to bugreport:6945)
- Activated traps can no longer be hit
- Fixed a problem that left "trap ghosts" forever on the screen when a trap was knocked out of the screen
- Monster behavior fixes
  * Monsters will no longer be able to do normal attacks when hiding
  * If out of any reason a monster on "attack" state can't move and can't do normal attacks, it will now use "attack" state skills
  * The order of monster thought processing is now equal to official servers
- Fixed some potential map server crashes

Mega thanks to Playtester (rathena b88e95381d6a7)
HPM Hooks Update

Signed-off-by: HerculesWSAPI <Hercules@efficiently.awesome>