X-Git-Url: https://jfr.im/git/solanum.git/blobdiff_plain/5b96d9a6b92f3ca219ff2baab7596cc94580813d..8e2ebdb80add54d46c9f7f058ad469d70ddf9457:/modules/m_knock.c diff --git a/modules/m_knock.c b/modules/m_knock.c index 8cf5ea77..55a688d6 100644 --- a/modules/m_knock.c +++ b/modules/m_knock.c @@ -25,7 +25,6 @@ #include "stdinc.h" #include "sprintf_irc.h" -#include "tools.h" #include "channel.h" #include "client.h" #include "hash.h" @@ -138,13 +137,13 @@ m_knock(struct Client *client_p, struct Client *source_p, int parc, const char * * allow one knock per channel per knock_delay_channel */ if(!IsOper(source_p) && - (source_p->localClient->last_knock + ConfigChannel.knock_delay) > CurrentTime) + (source_p->localClient->last_knock + ConfigChannel.knock_delay) > rb_current_time()) { sendto_one(source_p, form_str(ERR_TOOMANYKNOCK), me.name, source_p->name, name, "user"); return 0; } - else if((chptr->last_knock + ConfigChannel.knock_delay_channel) > CurrentTime) + else if((chptr->last_knock + ConfigChannel.knock_delay_channel) > rb_current_time()) { sendto_one(source_p, form_str(ERR_TOOMANYKNOCK), me.name, source_p->name, name, "channel"); @@ -152,13 +151,13 @@ m_knock(struct Client *client_p, struct Client *source_p, int parc, const char * } /* ok, we actually can send the knock, tell client */ - source_p->localClient->last_knock = CurrentTime; + source_p->localClient->last_knock = rb_current_time(); sendto_one(source_p, form_str(RPL_KNOCKDLVR), me.name, source_p->name, name); } - chptr->last_knock = CurrentTime; + chptr->last_knock = rb_current_time(); if(ConfigChannel.use_knock) sendto_channel_local(chptr->mode.mode & MODE_FREEINVITE ? ALL_MEMBERS : ONLY_CHANOPS,