From feb6e94bf548f4b04f7dc04a31d8ed2b8aeb35ff Mon Sep 17 00:00:00 2001 From: sketchyphoenix Date: Wed, 14 Jan 2009 15:18:04 +0000 Subject: [PATCH] #commands used by nonGM players now appear in the chat like normal rather than being processed and ultimately failed, printing out failed command messages that should be visible to only GMs. (bugreport:2637) git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13450 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/atcommand.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/map/atcommand.c b/src/map/atcommand.c index a7f6ce228f..aa979b0171 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -9030,6 +9030,9 @@ bool is_atcommand(const int fd, struct map_session_data* sd, const char* message if (*message == charcommand_symbol) { + if (gmlvl = 0) + return false; + //Checks to see if #command has a name or a name + parameters. x = sscanf(message, "%99s \"%23[^\"]\" %99[^\n]", cmd, charname, param); y = sscanf(message, "%99s %23s %99[^\n]", cmd, charname2, param2); @@ -9037,9 +9040,6 @@ bool is_atcommand(const int fd, struct map_session_data* sd, const char* message //x being > 1 is unique to its proper syntax z = ( x > 1 ) ? x : y; - sprintf(output, "x = %d, y = %d, z = %d", x, y, z); - clif_displaymessage(fd, output); - if ( (pl_sd = map_nick2sd(charname)) == NULL && ( (pl_sd = map_nick2sd(charname2)) == NULL ) ) { sprintf(output, "%s failed. Player not found.", cmd); @@ -9066,6 +9066,7 @@ bool is_atcommand(const int fd, struct map_session_data* sd, const char* message sprintf(output, "Charcommand failed. Usage: # ."); clif_displaymessage(fd, output); return true; + } return is_atcommand_sub(fd,sd,message,gmlvl);