From 880d754af62f2658b8c5ca94cf682626ad0b53ce Mon Sep 17 00:00:00 2001 From: sketchyphoenix Date: Thu, 25 Dec 2008 21:38:51 +0000 Subject: * 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 --- src/map/atcommand.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/map/atcommand.c') 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 ) { -- cgit v1.2.3-70-g09d2