summaryrefslogtreecommitdiff
path: root/src/map/atcommand.c
diff options
context:
space:
mode:
authorcodemaster <codemaster@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-01-04 22:13:58 +0000
committercodemaster <codemaster@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-01-04 22:13:58 +0000
commitdc28241d3c6716fed00b78d9a6977f89c4644178 (patch)
tree33a7686aa2a53ddfebe68d0e2288e0434f98ee5d /src/map/atcommand.c
parent51f5bae697fac9db3af051bcb5c156c94984fc18 (diff)
downloadhercules-dc28241d3c6716fed00b78d9a6977f89c4644178.tar.gz
hercules-dc28241d3c6716fed00b78d9a6977f89c4644178.tar.bz2
hercules-dc28241d3c6716fed00b78d9a6977f89c4644178.tar.xz
hercules-dc28241d3c6716fed00b78d9a6977f89c4644178.zip
* Fixed GM Command Logging (Not sure why TXT logging still isn't working properly :( ) [Codemaster] [SVN 907]
* Fixed one of Lupus' additions to the item_db [Codemaster] [SVN 907] git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@907 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r--src/map/atcommand.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index bf5d434c6..7a40bb4ed 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -721,7 +721,7 @@ is_atcommand(const int fd, struct map_session_data* sd, const char* message, int
if (!*str)
return AtCommand_None;
- type = atcommand(gmlvl > 0 ? gmlvl : pc_isGM(sd), str, &info);
+ type = atcommand(sd, gmlvl > 0 ? gmlvl : pc_isGM(sd), str, &info);
if (type != AtCommand_None) {
char command[100];
char output[200];
@@ -747,10 +747,6 @@ is_atcommand(const int fd, struct map_session_data* sd, const char* message, int
}
}
- // ToDo: Fix Logs :)
- if((log_config.gm) && (info.level >= log_config.gm))
- log_atcommand(sd, message);
-
return info.type;
}
@@ -761,7 +757,7 @@ is_atcommand(const int fd, struct map_session_data* sd, const char* message, int
*
*------------------------------------------
*/
-AtCommandType atcommand(const int level, const char* message, struct AtCommandInfo* info) {
+AtCommandType atcommand(struct map_session_data* sd, const int level, const char* message, struct AtCommandInfo* info) {
char* p = (char *)message; // it's 'char' and not 'const char' to have possibility to modify the first character if necessary
if (!info)
@@ -794,6 +790,8 @@ AtCommandType atcommand(const int level, const char* message, struct AtCommandIn
return AtCommand_None;
else
return AtCommand_Unknown;
+ } else if((log_config.gm) && (atcommand_info[i].level >= log_config.gm)) {
+ log_atcommand(sd, message);
}
memcpy(info, &atcommand_info[i], sizeof atcommand_info[i]);
} else {