This commit is contained in:
shoopea 2020-06-21 15:26:56 +02:00
parent e1b4a043d3
commit aeb039ed96

17
main.go
View File

@ -154,11 +154,24 @@ func main() {
Packet: p,
}
sp.Read(b[:p.PLength])
ok, err := regexp.MatchString("\\[udp\\] queried from (.*)", sp.Text)
logErrorDebug(err, "match string")
ok, err := regexp.MatchString("\\[udp\\] queried from .*", sp.Text)
logErrorDebug(err, "queried from")
if sp.Origin != "net" || ok == false {
logInfoDebug("AdminPacketServerConsole :\n- Origin: %q\n- Text: %s", sp.Origin, sp.Text)
}
ok, err = regexp.MatchString("\\[All\\] .*: !unpause", sp.Text)
logErrorDebug(err, "!unpause")
if ok {
forcedPause = false
}
ok, err = regexp.MatchString("\\[All\\] .*: !pause", sp.Text)
logErrorDebug(err, "!unpause")
if ok {
forcedPause = true
}
case AdminPacketServerRConEnd:
sp := PacketServerRConEnd{
Packet: p,