217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
|
[servers sort];
__block int maxmenu = 16;
[servers enumerateObjectsUsingBlock:^(
ServerInfo *si, size_t i, bool *stop) {
if (si.address.host != ENET_HOST_ANY && si.ping != 9999) {
if (si.protocol != PROTOCOL_VERSION)
si.full = [OFString
stringWithFormat:
@"%@ [different cube protocol]",
si.name];
else
si.full = [OFString
stringWithFormat:@"%d\t%d\t%@, %@: %@ %@",
si.ping, si.numplayers,
si.map.length > 0 ? si.map : @"[unknown]",
modestr(si.mode), si.name, si.sdesc];
} else
si.full = [OFString
stringWithFormat:
(si.address.host != ENET_HOST_ANY
? @"%@ [waiting for server response]"
: @"%@ [unknown host]\t"),
si.name];
// cut off too long server descriptions
if (si.full.length > 50)
|
|
<
|
<
|
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
|
[servers sort];
__block int maxmenu = 16;
[servers enumerateObjectsUsingBlock:^(
ServerInfo *si, size_t i, bool *stop) {
if (si.address.host != ENET_HOST_ANY && si.ping != 9999) {
if (si.protocol != PROTOCOL_VERSION)
si.full = [OFString stringWithFormat:
@"%@ [different cube protocol]",
si.name];
else
si.full = [OFString
stringWithFormat:@"%d\t%d\t%@, %@: %@ %@",
si.ping, si.numplayers,
si.map.length > 0 ? si.map : @"[unknown]",
modestr(si.mode), si.name, si.sdesc];
} else
si.full = [OFString stringWithFormat:
(si.address.host != ENET_HOST_ANY
? @"%@ [waiting for server response]"
: @"%@ [unknown host]\t"),
si.name];
// cut off too long server descriptions
if (si.full.length > 50)
|