test
This commit is contained in:
		
							parent
							
								
									8720e79422
								
							
						
					
					
						commit
						a609dd236f
					
				
							
								
								
									
										16
									
								
								bot.go
									
									
									
									
									
								
							
							
						
						
									
										16
									
								
								bot.go
									
									
									
									
									
								
							@ -22,11 +22,27 @@ func BotHandlers(b *tb.Bot) {
 | 
			
		||||
 | 
			
		||||
func botPause(m *tb.Message) {
 | 
			
		||||
	forcePaused = true
 | 
			
		||||
	paused = true
 | 
			
		||||
	px := PacketAdminRCon{
 | 
			
		||||
		Packet:  Packet{PType: AdminPacketAdminRCon},
 | 
			
		||||
		Command: "pause",
 | 
			
		||||
	}
 | 
			
		||||
	_, err := conn.Write(px.Bytes())
 | 
			
		||||
	logErrorDebug(err, "botPause : conn.Write")
 | 
			
		||||
	return
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func botUnpause(m *tb.Message) {
 | 
			
		||||
	forcePaused = false
 | 
			
		||||
	if pause && len(clients) > 1 {
 | 
			
		||||
		paused = false
 | 
			
		||||
		px := PacketAdminRCon{
 | 
			
		||||
			Packet:  Packet{PType: AdminPacketAdminRCon},
 | 
			
		||||
			Command: "unpause",
 | 
			
		||||
		}
 | 
			
		||||
		_, err := conn.Write(px.Bytes())
 | 
			
		||||
		logErrorDebug(err, "botUnpause : conn.Write")
 | 
			
		||||
	}
 | 
			
		||||
	return
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user