From 1ba4f8cd6158f5133189449c0ee3b8b3461c65f0 Mon Sep 17 00:00:00 2001 From: gumi Date: Sat, 18 Apr 2020 10:20:47 -0400 Subject: don't spam the GM logs with hugo/linus --- .gitignore | 3 +++ src/map/atcommand.cpp | 12 ++++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 50fc305..d28b05e 100644 --- a/.gitignore +++ b/.gitignore @@ -29,3 +29,6 @@ /build-mips-linux-gnu/ /build-mipsel-linux-gnu/ /build-powerpc-linux-gnu/ + +# generic build +/build/ diff --git a/src/map/atcommand.cpp b/src/map/atcommand.cpp index a9774f0..3058584 100644 --- a/src/map/atcommand.cpp +++ b/src/map/atcommand.cpp @@ -91,6 +91,7 @@ namespace map enum class ATCE { OKAY, + OKAY_NOLOG, USAGE, EXIST, RANGE, @@ -311,6 +312,9 @@ bool is_atcommand(Session *s, dumb_ptr sd, if (info->level) log_atcommand(sd, message); break; + case ATCE::OKAY_NOLOG: + // explicitly don't log + break; case ATCE::USAGE: clif_displaymessage(s, "Command failed: usage error"_s); clif_displaymessage(s, STRPRINTF("Usage: %s %s"_fmt, AString(command), info->args)); @@ -809,7 +813,7 @@ ATCE atcommand_jump(Session *s, dumb_ptr sd, return ATCE::RANGE; } - return ATCE::OKAY; + return ATCE::OKAY_NOLOG; } static @@ -1222,7 +1226,7 @@ ATCE atcommand_storage(Session *s, dumb_ptr sd, storage_storageopen(sd); - return ATCE::OKAY; + return ATCE::OKAY_NOLOG; } static @@ -4624,7 +4628,7 @@ ATCE atcommand_trade(Session *, dumb_ptr sd, if (pl_sd) { trade_traderequest(sd, pl_sd->bl_id); - return ATCE::OKAY; + return ATCE::OKAY_NOLOG; } return ATCE::EXIST; } @@ -4947,7 +4951,7 @@ ATCE atcommand_jump_iterate(Session *s, dumb_ptr sd, sd->followtarget = pl_sd->bl_id; - return ATCE::OKAY; + return ATCE::OKAY_NOLOG; } static -- cgit v1.2.3-60-g2f50