}
if(do_match) {
struct HandleInfoQueueEntry* entry = getNextHandleInfoQueueEntry(bot, 1);
- authlookup_callback_t *callback = entry->callback;
- callback(auth, exists, entry->data);
- free(entry);
+ if(entry) {
+ authlookup_callback_t *callback = entry->callback;
+ callback(auth, exists, entry->data);
+ free(entry);
+ }
}
}
printf_mysql_query("SELECT `chanuser_seen` FROM `chanusers` WHERE `chanuser_cid` = '%s' AND `chanuser_access` >= 300 ORDER BY `chanuser_seen` DESC LIMIT 1", row[0]);
res2 = mysql_use();
row2 = mysql_fetch_row(res);
- if(row2 && (time(0) - atoi(row2[0])) < duration) continue;
+ if(row2 && atol(row2[0]) > (time(0) - duration)) continue;
channel = getChanByName(row[1]);
if(channel) {
cache->who_count++;