Cube  Diff

Differences From Artifact [bb466005e7]:

To Artifact [7409dbfc1c]:


270
271
272
273
274
275
276
277
278
279
280



281
282
283
284
285
286
287
270
271
272
273
274
275
276

277


278
279
280
281
282
283
284
285
286
287







-

-
-
+
+
+







refreshservers()
{
	checkresolver();
	checkpings();
	if (lastmillis - lastinfo >= 5000)
		pingservers();
	[servers sort];
	int maxmenu = 16;

	size_t i = 0;
	for (ServerInfo *si in servers) {
	__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 alloc]
				    initWithFormat:
				        @"%@ [different cube protocol]",
				    si.name];
			else
302
303
304
305
306
307
308
309
310
311

312
313
314
315
316
317
318
302
303
304
305
306
307
308



309
310
311
312
313
314
315
316







-
-
-
+







		if (si.full.length > 50)
			si.full = [si.full substringToIndex:50];

		menumanual(1, i, si.full);

		if (!--maxmenu)
			return;

		i++;
	}
	}];
}

void
servermenu()
{
	if (pingsock == ENET_SOCKET_NULL) {
		pingsock = enet_socket_create(ENET_SOCKET_TYPE_DATAGRAM, NULL);