test
This commit is contained in:
parent
fb86db548e
commit
8b3f670b5a
20
bot.go
20
bot.go
@ -22,13 +22,18 @@ func BotHandlers(b *tb.Bot) {
|
||||
|
||||
func botPause(m *tb.Message) {
|
||||
forcePaused = true
|
||||
paused = true
|
||||
px := PacketAdminRCon{
|
||||
Packet: Packet{PType: AdminPacketAdminRCon},
|
||||
Command: "pause",
|
||||
if !paused {
|
||||
paused = true
|
||||
px := PacketAdminRCon{
|
||||
Packet: Packet{PType: AdminPacketAdminRCon},
|
||||
Command: "pause",
|
||||
}
|
||||
_, err := conn.Write(px.Bytes())
|
||||
logErrorDebug(err, "botPause : conn.Write")
|
||||
sendChat(-436055948, "Game paused.")
|
||||
} else {
|
||||
sendChat(-436055948, "Game already paused.")
|
||||
}
|
||||
_, err := conn.Write(px.Bytes())
|
||||
logErrorDebug(err, "botPause : conn.Write")
|
||||
return
|
||||
}
|
||||
|
||||
@ -42,6 +47,9 @@ func botUnpause(m *tb.Message) {
|
||||
}
|
||||
_, err := conn.Write(px.Bytes())
|
||||
logErrorDebug(err, "botUnpause : conn.Write")
|
||||
sendChat(-436055948, "Game unpaused.")
|
||||
} else {
|
||||
sendChat(-436055948, "Game already unpaused.")
|
||||
}
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user