summaryrefslogtreecommitdiff
path: root/src/map/atcommand.c
diff options
context:
space:
mode:
authorsketchyphoenix <sketchyphoenix@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-01-14 15:18:04 +0000
committersketchyphoenix <sketchyphoenix@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-01-14 15:18:04 +0000
commit56fae5b1bc284d5806c256969a807f3bdf1ed5e8 (patch)
tree48ca4825f4cc0f1bae7577139c5ff51f9d894f09 /src/map/atcommand.c
parent0e882b69855dab5ae0c50e52b3db8316c6054751 (diff)
downloadhercules-56fae5b1bc284d5806c256969a807f3bdf1ed5e8.tar.gz
hercules-56fae5b1bc284d5806c256969a807f3bdf1ed5e8.tar.bz2
hercules-56fae5b1bc284d5806c256969a807f3bdf1ed5e8.tar.xz
hercules-56fae5b1bc284d5806c256969a807f3bdf1ed5e8.zip
#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
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r--src/map/atcommand.c7
1 files changed, 4 insertions, 3 deletions
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: #<command> <char name> <params>.");
clif_displaymessage(fd, output);
return true;
+
}
return is_atcommand_sub(fd,sd,message,gmlvl);