From 7311750f5651f2b34c70d9b3e41f233a86803f97 Mon Sep 17 00:00:00 2001 From: zephyrus Date: Wed, 25 Feb 2009 06:04:18 +0000 Subject: [PATCH] - Bugreport #2800 ( Atcommands usables without restriction :S ) git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13547 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/atcommand.c | 3 +-- src/map/script.c | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 7836cefcb8..f6928dcc09 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -9028,8 +9028,7 @@ bool is_atcommand(const int fd, struct map_session_data* sd, const char* message //Grab the command information and check for the proper GM level required to use it or if the command exists info = get_atcommandinfo_byname(command); - if( info == NULL || info->func == NULL || ( *atcmd_msg == atcommand_symbol && ((info) ? 99:pc_isGM(sd)) < info->level ) - || ( *atcmd_msg == charcommand_symbol && ((info) ? 99:pc_isGM(sd)) < info->level2 ) ) + if( info == NULL || info->func == NULL || ( type && ((*atcmd_msg == atcommand_symbol && pc_isGM(sd) < info->level) || (*atcmd_msg == charcommand_symbol && pc_isGM(sd) < info->level2)) ) ) { sprintf(output, msg_txt(153), command); // "%s is Unknown Command." clif_displaymessage(fd, output); diff --git a/src/map/script.c b/src/map/script.c index 178bbdf4bb..05779ed9ee 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -10734,7 +10734,6 @@ BUILDIN_FUNC(atcommand) } is_atcommand(fd, sd, cmd, 0); - return 0; } @@ -10770,8 +10769,7 @@ BUILDIN_FUNC(charcommand) return 1; } - is_atcommand(0, sd, cmd, 0); - + is_atcommand(fd, sd, cmd, 0); return 0; }