Skip to content

Commit

Permalink
Rename loopPackets to filterLoopingPackets
Browse files Browse the repository at this point in the history
  • Loading branch information
Arikatsu committed Nov 28, 2023
1 parent f3df122 commit c713cf0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/main/java/emu/lunarcore/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ public static class LogOptions {
public boolean commands = true;
public boolean connections = true;
public boolean packets = false;
public boolean loopPackets = false;
public boolean filterLoopingPackets = false;
}

@Getter
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/emu/lunarcore/server/game/GameSession.java
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public void onMessage(ByteBuf packet) {

// Log packet
if (LunarCore.getConfig().getLogOptions().packets) {
if (LunarCore.getConfig().getLogOptions().loopPackets && CmdIdUtils.LOOP_PACKETS.contains(opcode)) {
if (LunarCore.getConfig().getLogOptions().filterLoopingPackets && CmdIdUtils.LOOP_PACKETS.contains(opcode)) {
return;
}

Expand Down Expand Up @@ -156,7 +156,7 @@ public void send(BasePacket packet) {

// Log
if (LunarCore.getConfig().getLogOptions().packets) {
if (LunarCore.getConfig().getLogOptions().loopPackets && CmdIdUtils.LOOP_PACKETS.contains(packet.getOpcode())) {
if (LunarCore.getConfig().getLogOptions().filterLoopingPackets && CmdIdUtils.LOOP_PACKETS.contains(packet.getOpcode())) {
return;
}

Expand All @@ -175,7 +175,7 @@ public void send(int cmdId) {

// Log
if (LunarCore.getConfig().getLogOptions().packets) {
if (LunarCore.getConfig().getLogOptions().loopPackets && CmdIdUtils.LOOP_PACKETS.contains(cmdId)) {
if (LunarCore.getConfig().getLogOptions().filterLoopingPackets && CmdIdUtils.LOOP_PACKETS.contains(cmdId)) {
return;
}

Expand Down

0 comments on commit c713cf0

Please sign in to comment.