}
struct neonserv_cmd_users_cache *cache = malloc(sizeof(*cache));
if (!cache) {
- perror("malloc() failed");
+ printf_log("neonserv", LOG_ERROR, "%s:%d malloc() failed", __FILE__, __LINE__);
return;
}
cache->client = client;
table_add(table, content);
while ((row = mysql_fetch_row(res)) != NULL) {
caccess = atoi(row[0]);
- if((!usermask || !match(usermask, row[1])) && caccess >= min_access && caccess <= max_access) {
+ if((!usermask || !match(usermask, row[1])) && (min_access == 1 || caccess >= min_access) && (max_access == 500 || caccess <= max_access)) {
content[0] = row[0];
content[1] = row[1];
is_here = 0;