test
This commit is contained in:
parent
e1b4a043d3
commit
aeb039ed96
17
main.go
17
main.go
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user