test
This commit is contained in:
parent
ae81b8a063
commit
8f444b1ab8
24
main.go
24
main.go
@ -149,6 +149,16 @@ func main() {
|
||||
}
|
||||
sp.Read(b[:p.PLength])
|
||||
logInfoDebug("AdminPacketServerChat :\n- ActionID: %d\n- DestinationID: %d\n- ClientID: %d\n- Message: %s\n- Amount: %d", sp.ActionID, sp.DestinationID, sp.ClientID, sp.Message, sp.Amount)
|
||||
|
||||
if sp.Message == "!unpause" {
|
||||
logInfoDebug("AdminPacketServerChat : Unpausing")
|
||||
forcePaused = false
|
||||
}
|
||||
|
||||
if sp.Message == "!pause" && ok {
|
||||
logInfoDebug("AdminPacketServerChat : Pausing")
|
||||
forcePaused = true
|
||||
}
|
||||
case AdminPacketServerConsole:
|
||||
sp := PacketServerConsole{
|
||||
Packet: p,
|
||||
@ -160,20 +170,6 @@ func main() {
|
||||
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 sp.Origin != "console" && ok {
|
||||
logInfoDebug("AdminPacketServerConsole : Unpausing")
|
||||
forcePaused = false
|
||||
}
|
||||
|
||||
ok, err = regexp.MatchString("\\[All\\] .*\\: !pause", sp.Text)
|
||||
logErrorDebug(err, "!pause")
|
||||
if sp.Origin != "console" && ok {
|
||||
logInfoDebug("AdminPacketServerConsole : Pausing")
|
||||
forcePaused = true
|
||||
}
|
||||
case AdminPacketServerRConEnd:
|
||||
sp := PacketServerRConEnd{
|
||||
Packet: p,
|
||||
|
Loading…
Reference in New Issue
Block a user