*/
#include "stdinc.h"
-#include "sprintf_irc.h"
-#include "tools.h"
#include "channel.h"
#include "client.h"
#include "hash.h"
-#include "irc_string.h"
+#include "match.h"
#include "ircd.h"
#include "numeric.h"
#include "send.h"
DECLARE_MODULE_AV1(knock, NULL, NULL, knock_clist, NULL, NULL, "$Revision: 3570 $");
/* m_knock
- * parv[0] = sender prefix
* parv[1] = channel
*
* The KNOCK command has the following syntax:
if(!((chptr->mode.mode & MODE_INVITEONLY) || (*chptr->mode.key) ||
(chptr->mode.limit &&
- dlink_list_length(&chptr->members) >= (unsigned long)chptr->mode.limit)))
+ rb_dlink_list_length(&chptr->members) >= (unsigned long)chptr->mode.limit)))
{
sendto_one_numeric(source_p, ERR_CHANOPEN,
form_str(ERR_CHANOPEN), name);
* 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");
}
/* 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,