diff options
author | sketchyphoenix <sketchyphoenix@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-12-25 21:38:51 +0000 |
---|---|---|
committer | sketchyphoenix <sketchyphoenix@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2008-12-25 21:38:51 +0000 |
commit | 880d754af62f2658b8c5ca94cf682626ad0b53ce (patch) | |
tree | 51d179a06721793ab64fef56591a20f5c97bc93b /src | |
parent | b6a3f6c46d7e21444d69350c3fedff29084acb99 (diff) | |
download | hercules-880d754af62f2658b8c5ca94cf682626ad0b53ce.tar.gz hercules-880d754af62f2658b8c5ca94cf682626ad0b53ce.tar.bz2 hercules-880d754af62f2658b8c5ca94cf682626ad0b53ce.tar.xz hercules-880d754af62f2658b8c5ca94cf682626ad0b53ce.zip |
* Charcommands no longer default to self if no target is found.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13413 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r-- | src/map/atcommand.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 2e522d541..90a7b82a0 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -8965,8 +8965,13 @@ bool is_atcommand(const int fd, struct map_session_data* sd, const char* message if (*message == charcommand_symbol) { - if (sscanf(message, "%99s \"%23[^\"]\" %99[^\n]", cmd, charname, param) > 2 - || sscanf(message, "%99s %23s %99[^\n]", cmd, charname, param) > 2) + if( sscanf(message, "%99s %99[^\n]", cmd, param) == 1 ) { + sprintf(output, "%s failed. Please enter a player name.", cmd); + clif_displaymessage(fd, output); + return true; + } + else if (sscanf(message, "%99s \"%23[^\"]\" %99[^\n]", cmd, charname, param) > 1 + || sscanf(message, "%99s %23s %99[^\n]", cmd, charname, param) > 1) { if ( (pl_sd = map_nick2sd(charname)) == NULL ) { |