Skip to content

Commit

Permalink
don't spam the GM logs with hugo/linus
Browse files Browse the repository at this point in the history
  • Loading branch information
Helianthella committed Apr 18, 2020
1 parent e3fdc84 commit 1ba4f8c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,6 @@
/build-mips-linux-gnu/
/build-mipsel-linux-gnu/
/build-powerpc-linux-gnu/

# generic build
/build/
12 changes: 8 additions & 4 deletions src/map/atcommand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ namespace map
enum class ATCE
{
OKAY,
OKAY_NOLOG,
USAGE,
EXIST,
RANGE,
Expand Down Expand Up @@ -311,6 +312,9 @@ bool is_atcommand(Session *s, dumb_ptr<map_session_data> 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));
Expand Down Expand Up @@ -809,7 +813,7 @@ ATCE atcommand_jump(Session *s, dumb_ptr<map_session_data> sd,
return ATCE::RANGE;
}

return ATCE::OKAY;
return ATCE::OKAY_NOLOG;
}

static
Expand Down Expand Up @@ -1222,7 +1226,7 @@ ATCE atcommand_storage(Session *s, dumb_ptr<map_session_data> sd,

storage_storageopen(sd);

return ATCE::OKAY;
return ATCE::OKAY_NOLOG;
}

static
Expand Down Expand Up @@ -4624,7 +4628,7 @@ ATCE atcommand_trade(Session *, dumb_ptr<map_session_data> sd,
if (pl_sd)
{
trade_traderequest(sd, pl_sd->bl_id);
return ATCE::OKAY;
return ATCE::OKAY_NOLOG;
}
return ATCE::EXIST;
}
Expand Down Expand Up @@ -4947,7 +4951,7 @@ ATCE atcommand_jump_iterate(Session *s, dumb_ptr<map_session_data> sd,

sd->followtarget = pl_sd->bl_id;

return ATCE::OKAY;
return ATCE::OKAY_NOLOG;
}

static
Expand Down

0 comments on commit 1ba4f8c

Please sign in to comment.