struct ClientSocket *bot;
while((chanuserrow = mysql_fetch_row(res)) != NULL) {
int userflags = atoi(chanuserrow[1]);
- if(!(userflags & DB_CHANUSER_AUTOINVITE)) continue;
+ if(!(argc && !stricmp(argv[0], "all")) && !(userflags & DB_CHANUSER_AUTOINVITE)) continue;
if(!(chan = getChanByName(chanuserrow[2]))) continue; //no bot is in the channel
if((bchanuser = getChanUser(client->user, chan)) && (bchanuser->flags & CHANUSERFLAG_OPPED))
bot = client;