CUList empty;
public:
LocalIntExt jointime;
- DelayMsgMode(InspIRCd* Instance, Module* Parent) : ModeHandler(Instance, Parent, 'd', 1, 0, false, MODETYPE_CHANNEL, false, 0, '@'), jointime("delaymsg", Parent) {};
+ DelayMsgMode(Module* Parent) : ModeHandler(Parent, 'd', PARAM_SETONLY, MODETYPE_CHANNEL)
+ , jointime("delaymsg", Parent)
+ {
+ levelrequired = OP_VALUE;
+ }
ModePair ModeSet(User*, User*, Channel* channel, const std::string ¶meter)
{
}
}
- bool CheckTimeStamp(std::string &their_param, const std::string &our_param, Channel*)
+ bool ResolveModeConflict(std::string &their_param, const std::string &our_param, Channel*)
{
return (atoi(their_param.c_str()) < atoi(our_param.c_str()));
}
private:
DelayMsgMode djm;
public:
- ModuleDelayMsg(InspIRCd* Me) : Module(Me), djm(Me, this)
+ ModuleDelayMsg() : djm(this)
{
if (!ServerInstance->Modes->AddMode(&djm))
throw ModuleException("Could not add new modes!");
ModuleDelayMsg::~ModuleDelayMsg()
{
- ServerInstance->Modes->DelMode(&djm);
}
Version ModuleDelayMsg::GetVersion()
{
- return Version("$Id$", VF_COMMON | VF_VENDOR, API_VERSION);
+ return Version("Provides channelmode +d <int>, to deny messages to a channel until <int> seconds.", VF_COMMON | VF_VENDOR, API_VERSION);
}
void ModuleDelayMsg::OnUserJoin(Membership* memb, bool sync, bool created, CUList&)