multi server lol

idk why i improved this because this is unused
This commit is contained in:
Chayapak 2023-06-17 13:43:16 +07:00
parent 3a840b32d1
commit 0cf8fc86af

View file

@ -11,6 +11,7 @@ import java.io.IOException;
import java.io.OutputStreamWriter;
import java.nio.charset.StandardCharsets;
// normally unused in the main instance of the bot
public class PacketSnifferPlugin extends Bot.Listener {
@Getter @Setter private boolean enabled = false;
@ -20,7 +21,16 @@ public class PacketSnifferPlugin extends Bot.Listener {
if (!enabled) return;
try {
writer = new OutputStreamWriter(new FileOutputStream("packets.log"), StandardCharsets.UTF_8);
writer = new OutputStreamWriter(
new FileOutputStream(
String.format(
"packets-%s-%s.log",
bot.options().host(),
bot.options().port()
)
),
StandardCharsets.UTF_8
);
} catch (IOException e) {
e.printStackTrace();
}