-/* cmd_neonserv_users.c - NeonServ v5.4
+/* cmd_neonserv_users.c - NeonServ v5.6
* Copyright (C) 2011-2012 Philipp Kreil (pk910)
*
* This program is free software: you can redistribute it and/or modify
}
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;
- cache->textclient = getTextBot();
+ cache->textclient = textclient;
cache->user = user;
cache->usermask = (usermask ? strdup(usermask) : NULL);
cache->min_access = min_access;
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;