Only stringify rcon responses if debug enabled.

This commit is contained in:
onyx-and-iris 2024-03-20 21:49:05 +00:00
parent 725e6cfb3d
commit f6f0044a84

View File

@ -85,7 +85,7 @@ func (s *Session) proxyFrom(buf []byte) error {
return err
}
if s.isRconResponsePacket(buf) {
if s.isRconResponsePacket(buf) && log.GetLevel() == log.DebugLevel {
parts := strings.Split(string(buf[10:]), " ")
log.Debugf("Response: %s", strings.Join(parts, " "))
}