mirror of
https://github.com/onyx-and-iris/q3rcon-proxy.git
synced 2025-01-18 00:30:54 +00:00
split 3 times, log last part
This commit is contained in:
parent
0935fc1190
commit
2c8ae43303
@ -89,8 +89,8 @@ func (s *session) proxyTo(buf []byte) error {
|
||||
}
|
||||
|
||||
if s.isRconRequestPacket(buf) {
|
||||
parts := strings.Split(string(buf), " ")
|
||||
log.Infof("From [%s] To [%s] Command: %s", s.caddr.IP, s.serverConn.RemoteAddr(), strings.Join(parts[2:], " "))
|
||||
parts := strings.SplitN(string(buf), " ", 3)
|
||||
log.Infof("From [%s] To [%s] Command: %s", s.caddr.IP, s.serverConn.RemoteAddr(), parts[len(parts)-1])
|
||||
}
|
||||
|
||||
return nil
|
||||
|
Loading…
Reference in New Issue
Block a user