mirror of
https://github.com/onyx-and-iris/q3rcon-proxy.git
synced 2025-04-20 12:33:48 +01:00
Compare commits
No commits in common. "0935fc1190716424444f351f15b33d76e51e36b5" and "0c054377babb8addd3d6b613ea81640a60856c6f" have entirely different histories.
0935fc1190
...
0c054377ba
@ -64,12 +64,8 @@ func (s *session) proxyFrom(buf []byte) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if s.isRconResponsePacket(buf) {
|
if s.isRconResponsePacket(buf) {
|
||||||
if s.isBadRconResponse(buf) {
|
|
||||||
log.Infof("Response: Bad rcon from %s", s.caddr.IP)
|
|
||||||
} else {
|
|
||||||
log.Debugf("Response: %s", string(buf[10:]))
|
log.Debugf("Response: %s", string(buf[10:]))
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
@ -26,7 +26,3 @@ func (v *validator) isQueryResponsePacket(buf []byte) bool {
|
|||||||
func (v *validator) isValidResponsePacket(buf []byte) bool {
|
func (v *validator) isValidResponsePacket(buf []byte) bool {
|
||||||
return v.isRconResponsePacket(buf) || v.isQueryResponsePacket(buf)
|
return v.isRconResponsePacket(buf) || v.isQueryResponsePacket(buf)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (v *validator) isBadRconResponse(buf []byte) bool {
|
|
||||||
return string(buf[10:18]) == "Bad rcon"
|
|
||||||
}
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user