mirror of
				https://github.com/Thor77/TeamspeakStats.git
				synced 2025-11-03 23:32:45 -05:00 
			
		
		
		
	add last_seen-attr to Client
This commit is contained in:
		
							parent
							
								
									26d993c55c
								
							
						
					
					
						commit
						473911f9d8
					
				
					 1 changed files with 2 additions and 0 deletions
				
			
		| 
						 | 
					@ -79,6 +79,7 @@ class Client:
 | 
				
			||||||
        self.pkicks = 0
 | 
					        self.pkicks = 0
 | 
				
			||||||
        self.bans = 0
 | 
					        self.bans = 0
 | 
				
			||||||
        self.pbans = 0
 | 
					        self.pbans = 0
 | 
				
			||||||
 | 
					        self.last_seen = 0
 | 
				
			||||||
        # private
 | 
					        # private
 | 
				
			||||||
        self._last_connect = 0
 | 
					        self._last_connect = 0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -101,6 +102,7 @@ class Client:
 | 
				
			||||||
        self.connected -= 1
 | 
					        self.connected -= 1
 | 
				
			||||||
        session_time = timestamp - self._last_connect
 | 
					        session_time = timestamp - self._last_connect
 | 
				
			||||||
        self.onlinetime += session_time
 | 
					        self.onlinetime += session_time
 | 
				
			||||||
 | 
					        self.last_seen = timestamp
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def kick(self, target):
 | 
					    def kick(self, target):
 | 
				
			||||||
        '''
 | 
					        '''
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue