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.
This commit is contained in:
Jilles Tjoelker 2013-04-08 00:08:55 +02:00
parent c66126bc39
commit ca5d947cb0
1 changed files with 1 additions and 3 deletions

View File

@ -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++;