rename isBadRconRequest to isBadRconResponse

This commit is contained in:
onyx-and-iris 2024-04-03 20:59:37 +01:00
parent 3e039824de
commit 0935fc1190
2 changed files with 2 additions and 2 deletions

View File

@ -64,7 +64,7 @@ func (s *session) proxyFrom(buf []byte) error {
} }
if s.isRconResponsePacket(buf) { if s.isRconResponsePacket(buf) {
if s.isBadRconRequest(buf) { if s.isBadRconResponse(buf) {
log.Infof("Response: Bad rcon from %s", s.caddr.IP) log.Infof("Response: Bad rcon from %s", s.caddr.IP)
} else { } else {
log.Debugf("Response: %s", string(buf[10:])) log.Debugf("Response: %s", string(buf[10:]))

View File

@ -27,6 +27,6 @@ func (v *validator) isValidResponsePacket(buf []byte) bool {
return v.isRconResponsePacket(buf) || v.isQueryResponsePacket(buf) return v.isRconResponsePacket(buf) || v.isQueryResponsePacket(buf)
} }
func (v *validator) isBadRconRequest(buf []byte) bool { func (v *validator) isBadRconResponse(buf []byte) bool {
return string(buf[10:18]) == "Bad rcon" return string(buf[10:18]) == "Bad rcon"
} }