};
static CMD_BIND(neonserv_cmd_resync) {
- int min_access = 1, max_access = 500;
+ int min_access = 0, max_access = 500;
char *usermask = NULL;
if(argc > 0)
usermask = argv[0];
static void neonserv_cmd_resync_async1(struct ClientSocket *client, struct ClientSocket *textclient, struct UserNode *user, struct ChanNode *chan, char *usermask, int min_access, int max_access) {
MYSQL_RES *res;
- MYSQL_ROW row, defaults;
+ MYSQL_ROW row, defaults = NULL;
int i;
int resync_op = 1;
int resync_voice = 1;
if(usermask && usermask[0] == '@') {
resync_voice = 0;
usermask++;
+ if(!*usermask) usermask = NULL;
} else if(usermask && usermask[0] == '+') {
resync_op = 0;
usermask++;
+ if(!*usermask) usermask = NULL;
}
struct ChanUser *chanuser;
int db_enfops, db_enfvoice;
}
}
}
- if((usermask && match(usermask, row[1])) || caccess < min_access || caccess > max_access) continue;
+ if((usermask && *usermask && match(usermask, row[1])) || caccess < min_access || caccess > max_access) continue;
if(caccess >= db_enfops) {
if(!(chanuser->flags & CHANUSERFLAG_OPPED) && resync_op)
modeBufferOp(modeBuf, chanuser->user->nick);