X-Git-Url: http://git.pk910.de/?p=NeonServV5.git;a=blobdiff_plain;f=src%2Fmodules%2FNeonServ.mod%2Fcmd_neonserv_users.c;h=1ab7d478acbfaf5d6196158b12a17e464b87b45a;hp=cd8d3754f9ad2308c22920a274ae66c8eadf30ea;hb=54ef844b721b720e9cc81dc4737c299a0e84cb59;hpb=706e48b1e666054030c491d864f740071e390038 diff --git a/src/modules/NeonServ.mod/cmd_neonserv_users.c b/src/modules/NeonServ.mod/cmd_neonserv_users.c index cd8d375..1ab7d47 100644 --- a/src/modules/NeonServ.mod/cmd_neonserv_users.c +++ b/src/modules/NeonServ.mod/cmd_neonserv_users.c @@ -1,4 +1,4 @@ -/* cmd_neonserv_users.c - NeonServ v5.3 +/* 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 @@ -44,16 +44,16 @@ CMD_BIND(neonserv_cmd_users) { } 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; cache->max_access = max_access; - get_userlist_with_invisible(chan, neonserv_cmd_users_userlist_lookup, cache); + get_userlist_with_invisible(chan, module_id, neonserv_cmd_users_userlist_lookup, cache); } static USERLIST_CALLBACK(neonserv_cmd_users_userlist_lookup) { @@ -86,7 +86,7 @@ static void neonserv_cmd_users_async1(struct ClientSocket *client, struct 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;