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) {
|
func botPause(m *tb.Message) {
|
||||||
forcePaused = true
|
forcePaused = true
|
||||||
paused = true
|
if !paused {
|
||||||
px := PacketAdminRCon{
|
paused = true
|
||||||
Packet: Packet{PType: AdminPacketAdminRCon},
|
px := PacketAdminRCon{
|
||||||
Command: "pause",
|
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
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -42,6 +47,9 @@ func botUnpause(m *tb.Message) {
|
|||||||
}
|
}
|
||||||
_, err := conn.Write(px.Bytes())
|
_, err := conn.Write(px.Bytes())
|
||||||
logErrorDebug(err, "botUnpause : conn.Write")
|
logErrorDebug(err, "botUnpause : conn.Write")
|
||||||
|
sendChat(-436055948, "Game unpaused.")
|
||||||
|
} else {
|
||||||
|
sendChat(-436055948, "Game already unpaused.")
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user