blacklist sorting fixed
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4021 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
@@ -1605,7 +1605,13 @@ void readscfg(const char *name)
|
||||
}
|
||||
|
||||
struct iprange { enet_uint32 lr, ur; };
|
||||
int cmpiprange(const void *a, const void * b) { return ((struct iprange *)a)->lr - ((struct iprange *)b)->lr; }
|
||||
int cmpiprange(const void *a, const void * b)
|
||||
{
|
||||
if(((struct iprange *)a)->lr < ((struct iprange *)b)->lr) return -1;
|
||||
if(((struct iprange *)a)->lr > ((struct iprange *)b)->lr) return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int cmpipmatch(const void *a, const void * b) { return - (((struct iprange *)a)->lr < ((struct iprange *)b)->lr) + (((struct iprange *)a)->lr > ((struct iprange *)b)->ur); }
|
||||
|
||||
enet_uint32 atoip(const char *s)
|
||||
|
||||
Reference in New Issue
Block a user