static void
gline_expire(UNUSED_ARG(void *data))
{
- time_t stopped;
+ unsigned long stopped;
void *wraa;
stopped = 0;
}
struct gline *
-gline_add(const char *issuer, const char *target, unsigned long duration, const char *reason, time_t issued, time_t lastmod, int announce)
+gline_add(const char *issuer, const char *target, unsigned long duration, const char *reason, unsigned long issued, unsigned long lastmod, int announce)
{
struct gline *ent;
struct gline *prev_first;
ent = dict_find(gline_dict, target, NULL);
if (ent) {
heap_remove_pred(gline_heap, gline_for_p, (char*)target);
- if (ent->expires < (time_t)(now + duration))
+ if (ent->expires < now + duration)
ent->expires = now + duration;
if (ent->lastmod < lastmod)
ent->lastmod = lastmod;
}
heap_insert(gline_heap, ent, ent);
if (!prev_first || (ent->expires < prev_first->expires)) {
- timeq_del(0, gline_expire, 0, TIMEQ_IGNORE_WHEN|TIMEQ_IGNORE_DATA);
- timeq_add(ent->expires, gline_expire, 0);
+ timeq_del(0, gline_expire, 0, TIMEQ_IGNORE_WHEN|TIMEQ_IGNORE_DATA);
+ timeq_add(ent->expires, gline_expire, 0);
}
if (announce)
irc_gline(NULL, ent);
{
struct record_data *rd = data;
const char *issuer, *reason, *dstr;
- time_t issued, expiration, lastmod;
+ unsigned long issued, expiration, lastmod;
if (!(reason = database_get_data(rd->d.object, KEY_REASON, RECDB_QSTRING))) {
- log_module(MAIN_LOG, LOG_ERROR, "Missing reason for gline %s", key);
- return 0;
+ log_module(MAIN_LOG, LOG_ERROR, "Missing reason for gline %s", key);
+ return 0;
}
if (!(dstr = database_get_data(rd->d.object, KEY_EXPIRES, RECDB_QSTRING))) {
- log_module(MAIN_LOG, LOG_ERROR, "Missing expiration for gline %s", key);
- return 0;
+ log_module(MAIN_LOG, LOG_ERROR, "Missing expiration for gline %s", key);
+ return 0;
}
expiration = strtoul(dstr, NULL, 0);
dstr = database_get_data(rd->d.object, KEY_LASTMOD, RECDB_QSTRING);