From 03e28514161087c8400d8b94446fba2487dd36d9 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Sat, 31 Dec 2011 21:35:59 +0000 Subject: Fixed "#cmd" nick exploit, bugreport:5188 git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15338 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/atcommand.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/map/atcommand.c') diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 7ff900eaf..7c7939211 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -9197,10 +9197,14 @@ bool is_atcommand(const int fd, struct map_session_data* sd, const char* message //z always has the value of the scan that was successful z = ( x > 1 ) ? x : y; - if ( (ssd = map_nick2sd(charname)) == NULL && ( (ssd = map_nick2sd(charname2)) == NULL ) ) - { - sprintf(output, "%s failed. Player not found.", command); - clif_displaymessage(fd, output); + if ( (ssd = map_nick2sd(charname)) == NULL && ( (ssd = map_nick2sd(charname2)) == NULL ) ) { + if( pc_isGM(sd) ) { + sprintf(output, "%s failed. Player not found.", command); + clif_displaymessage(fd, output); + } else { + sprintf(output, "Charcommand failed. Usage: # ."); + clif_displaymessage(fd, output); + } return true; } -- cgit v1.2.3-70-g09d2