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:
parent
c66126bc39
commit
ca5d947cb0
|
@ -27,9 +27,7 @@ static void waitreg_hook(hook_user_register_check_t *hdata)
|
||||||
if (hdata->si->su == NULL)
|
if (hdata->si->su == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
unsigned int nickage = CURRTIME - hdata->si->su->ts;
|
if (hdata->si->su->ts >= CURRTIME - waitreg_time)
|
||||||
|
|
||||||
if (nickage < 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."));
|
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++;
|
hdata->approved++;
|
||||||
|
|
Loading…
Reference in New Issue