mirror of
				https://github.com/chev2/tf2-voice-ban-bots.git
				synced 2025-10-30 08:12:33 +00:00 
			
		
		
		
	Sort IDs by digit length
This commit is contained in:
		
							parent
							
								
									1d248d7196
								
							
						
					
					
						commit
						431a138658
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		|  | @ -85,7 +85,7 @@ while mergefilequery not in ("y", "n"): | |||
|         print("Skipping merge step...") | ||||
| 
 | ||||
| dupe_number = len(players) - len(set(players)) #get number of duplicates | ||||
| players = set(players) #remove duplicates in case of merging | ||||
| players = sorted(set(players), key=lambda x: len(x)) #remove duplicates in case of merging, also sort by ID length (the voice_ban.dt file will break if not sorted) | ||||
| 
 | ||||
| players_as_string = "\x01\0\0\0" + '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0'.join(players) + '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0' #this is how the voice_ban.dt file is patterned | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Chev
						Chev