summaryrefslogtreecommitdiff
path: root/src/map/charcommand.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-02-01 21:04:46 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-02-01 21:04:46 +0000
commit5de3852d0e203ad08e4bdd748a49f8dba2e028c2 (patch)
treee4a1fce223b40e891fc5395c749d47b4de1fcd41 /src/map/charcommand.c
parentca0aa0f7e55896730f6470a7dec81e6293b305ff (diff)
downloadhercules-5de3852d0e203ad08e4bdd748a49f8dba2e028c2.tar.gz
hercules-5de3852d0e203ad08e4bdd748a49f8dba2e028c2.tar.bz2
hercules-5de3852d0e203ad08e4bdd748a49f8dba2e028c2.tar.xz
hercules-5de3852d0e203ad08e4bdd748a49f8dba2e028c2.zip
- Item search is now a bit smarter. When no item is found with the same 'aegis name', then the 'normal' name is used instead.
- Updated the @/# commands that take an item name so that you can use quotes when specifying item names with spaces in them. For example, @item "poring card" 1 will work now. Note that only the commands that work on ONE item have been updated, those that do an item list need to be updated as well. - Removed some garbage from the item_data structure. - Improved a bit the description of the mvp item get time config settings. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9767 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/charcommand.c')
-rw-r--r--src/map/charcommand.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/map/charcommand.c b/src/map/charcommand.c
index 2c6942c4e..27a80a986 100644
--- a/src/map/charcommand.c
+++ b/src/map/charcommand.c
@@ -1043,7 +1043,10 @@ int charcommand_item(
memset(item_name, '\0', sizeof(item_name));
- if (!message || !*message || sscanf(message, "%99s %d %23[^\n]", item_name, &number, character) < 3) {
+ if (!message || !*message || (
+ sscanf(message, "\"%99[^\"]\" %d %23[^\n]", item_name, &number, character) < 3 &&
+ sscanf(message, "%99s %d %23[^\n]", item_name, &number, character) < 3
+ )) {
clif_displaymessage(fd, "Please, enter an item name/id (usage: #item <item name or ID> <quantity> <char name>).");
return -1;
}