Load ban list from file
| 178 | playerObjects.Delete(i); |
| 179 | return; |
| 180 | } |
| 181 | } |
| 182 | } |
| 183 | // Load ban list from file |
| 184 | void LoadBanList(RString filename, FindArray<__int64>& list) |
| 185 | { |
| 186 | list.Clear(); |
| 187 | QIFStream f; |
| 188 | f.open(filename); |
| 189 | while (!f.eof() && !f.fail()) |
| 190 | { |
| 191 | int c = f.get(); |
| 192 | if (f.eof() || f.fail()) |
| 193 | { |
| 194 | return; |
| 195 | } |
| 196 | while (!isdigit(c)) |
| 197 | { |
| 198 | c = f.get(); |
| 199 | if (f.eof() || f.fail()) |
| 200 | { |
| 201 | return; |
| 202 | } |
| 203 | } |
| 204 | __int64 value = 0; |
| 205 | while (isdigit(c)) |
| 206 | { |
| 207 | value *= 10; |
| 208 | value += c - '0'; |
| 209 | c = f.get(); |
| 210 | } |
| 211 | list.AddUnique(value); |
| 212 | } |