jupe_t *jupes = NULL;
int handlejupe(void *source, int cargc, char **cargv);
-void sendjupeburst(int hook, void *args);
void _init() {
/* If we're connected to IRC, force a disconnect. */
irc_disconnected();
}
- registerhook(HOOK_IRC_SENDBURSTBURSTS, &sendjupeburst);
-
registerserverhandler("JU", &handlejupe, 5);
}
jupes = next;
}
- deregisterhook(HOOK_IRC_SENDBURSTBURSTS, &sendjupeburst);
-
deregisterserverhandler("JU", &handlejupe);
}
jupe->ju_flags = flags;
jupe->ju_lastmod = atoi(modtime);
- Error("jupe", ERR_WARNING, "jupe modified for %s (%s) expiring in %s,"
+ Error("jupe", ERR_INFO, "jupe modified for %s (%s) expiring in %s,"
" lastmod: %s, active: %s", server, reason, expire, modtime, flags ? "yes" : "no");
return CMD_OK;
}
if (jupe == NULL)
return CMD_ERROR;
- Error("jupe", ERR_WARNING, "jupe added for %s (%s) expiring in %s,"
+ Error("jupe", ERR_INFO, "jupe added for %s (%s) expiring in %s,"
" lastmod: %s, active: %s", server, reason, expire, modtime, flags ? "yes" : "no");
return CMD_OK;
}
-void sendjupeburst(int hook, void *args) {
- jupe_t *jupe = jupes;
-
- if (hook != HOOK_IRC_SENDBURSTBURSTS)
- return;
-
- while (jupe) {
- jupe_propagate(jupe);
-
- jupe = jupe->ju_next;
- }
-}
-
jupe_t *make_jupe(char *server, char *reason, time_t expirets, time_t lastmod, unsigned int flags) {
jupe_t *jupe;
return 0;
jupe = make_jupe(server, reason, getnettime() + duration, getnettime(), flags);
-
+
if (jupe == NULL)
return 0;