X-Git-Url: https://jfr.im/git/irc/quakenet/newserv.git/blobdiff_plain/5b9636e038f0e053630a585ab17acd594e03451f..28aa186de14dc4fa7488866e70beb6ae933dde79:/jupe/jupe.c diff --git a/jupe/jupe.c b/jupe/jupe.c index ba4b5080..b6601175 100644 --- a/jupe/jupe.c +++ b/jupe/jupe.c @@ -13,7 +13,6 @@ 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. */ @@ -22,8 +21,6 @@ void _init() { irc_disconnected(); } - registerhook(HOOK_IRC_SENDBURSTBURSTS, &sendjupeburst); - registerserverhandler("JU", &handlejupe, 5); } @@ -39,8 +36,6 @@ void _fini() { jupes = next; } - deregisterhook(HOOK_IRC_SENDBURSTBURSTS, &sendjupeburst); - deregisterserverhandler("JU", &handlejupe); } @@ -73,7 +68,7 @@ int handlejupe(void *source, int cargc, char **cargv) { 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; } @@ -83,25 +78,12 @@ int handlejupe(void *source, int cargc, char **cargv) { 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; @@ -208,7 +190,7 @@ int jupe_add(char *server, char *reason, time_t duration, unsigned int flags) { return 0; jupe = make_jupe(server, reason, getnettime() + duration, getnettime(), flags); - + if (jupe == NULL) return 0;