@@ 207-218 (lines=12) @@ | ||
204 | max_clients = int(slots.popleft().decode('utf-8')) |
|
205 | ||
206 | players = server['players'] |
|
207 | while len(slots) >= 6: |
|
208 | # no idea what this is, always empty |
|
209 | slots.popleft() |
|
210 | player = { |
|
211 | 'name': slots.popleft(), |
|
212 | 'clan': slots.popleft(), |
|
213 | 'country': int(slots.popleft().decode('utf-8')), |
|
214 | 'score': int(slots.popleft().decode('utf-8')), |
|
215 | 'ingame': int(slots.popleft().decode('utf-8')) |
|
216 | } |
|
217 | if player not in players: |
|
218 | players.append(player) |
|
219 | ||
220 | return { |
|
221 | 'ip': server['ip'], |
|
@@ 158-167 (lines=10) @@ | ||
155 | # no idea what this is, always empty |
|
156 | slots.popleft() |
|
157 | ||
158 | while len(slots) >= 5: |
|
159 | player = { |
|
160 | 'name': slots.popleft(), |
|
161 | 'clan': slots.popleft(), |
|
162 | 'country': int(slots.popleft().decode('utf-8')), |
|
163 | 'score': int(slots.popleft().decode('utf-8')), |
|
164 | 'ingame': int(slots.popleft().decode('utf-8')) |
|
165 | } |
|
166 | if player not in players: |
|
167 | players.append(player) |
|
168 | ||
169 | return { |
|
170 | 'ip': server['ip'], |