diff options
author | shennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2011-12-31 21:35:59 +0000 |
---|---|---|
committer | shennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2011-12-31 21:35:59 +0000 |
commit | 03e28514161087c8400d8b94446fba2487dd36d9 (patch) | |
tree | 78d2a9534951d27e775f24309586f276075a27df /src/map/atcommand.c | |
parent | 20ed71cc6035d360d8119b028d2fa24d397033bf (diff) | |
download | hercules-03e28514161087c8400d8b94446fba2487dd36d9.tar.gz hercules-03e28514161087c8400d8b94446fba2487dd36d9.tar.bz2 hercules-03e28514161087c8400d8b94446fba2487dd36d9.tar.xz hercules-03e28514161087c8400d8b94446fba2487dd36d9.zip |
Fixed "#cmd" nick exploit, bugreport:5188
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15338 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r-- | src/map/atcommand.c | 12 |
1 files changed, 8 insertions, 4 deletions
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: #<command> <char name> <params>."); + clif_displaymessage(fd, output); + } return true; } |