From 56fae5b1bc284d5806c256969a807f3bdf1ed5e8 Mon Sep 17 00:00:00 2001 From: sketchyphoenix Date: Wed, 14 Jan 2009 15:18:04 +0000 Subject: #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://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13450 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/atcommand.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/map/atcommand.c b/src/map/atcommand.c index a7f6ce228..aa979b017 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); -- cgit v1.2.3-60-g2f50