From ca5d947cb09aeae9db28cd2798158ca049a07ac2 Mon Sep 17 00:00:00 2001 From: Jilles Tjoelker Date: Mon, 8 Apr 2013 00:08:55 +0200 Subject: [PATCH] ns_waitreg: Do not accept registration if server's time is ahead of our time. The ns_waitreg probably still does not work very well since libmowgli-2's notion of time was broken a while ago. --- ns_waitreg.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ns_waitreg.c b/ns_waitreg.c index 4ba5e74..0673b57 100644 --- a/ns_waitreg.c +++ b/ns_waitreg.c @@ -27,9 +27,7 @@ static void waitreg_hook(hook_user_register_check_t *hdata) if (hdata->si->su == NULL) return; - unsigned int nickage = CURRTIME - hdata->si->su->ts; - - if (nickage < waitreg_time) + if (hdata->si->su->ts >= CURRTIME - waitreg_time) { command_fail(hdata->si, fault_badparams, _("You can not register your nick so soon after connecting. Please wait a while and try again.")); hdata->approved++;