X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_delaymsg.cpp;h=77ac5fc59a80024d01e65d1e8c55aae84bb4e5b3;hb=4a64082e31c3c3dfa97a1edfb8a3c97fe8d32ea7;hp=3e9f2641c3f4ea48f2a1d3f3e6ebfd2169877dba;hpb=b4be0c94ab5fb7e5a7a799a195c78de072a5e315;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_delaymsg.cpp b/src/modules/m_delaymsg.cpp index 3e9f2641c..77ac5fc59 100644 --- a/src/modules/m_delaymsg.cpp +++ b/src/modules/m_delaymsg.cpp @@ -22,7 +22,11 @@ class DelayMsgMode : public ModeHandler 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) { @@ -37,7 +41,7 @@ class DelayMsgMode : public ModeHandler } } - 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())); } @@ -50,7 +54,7 @@ class ModuleDelayMsg : public Module 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!"); @@ -97,7 +101,7 @@ ModuleDelayMsg::~ModuleDelayMsg() Version ModuleDelayMsg::GetVersion() { - return Version("$Id$", VF_COMMON | VF_VENDOR, API_VERSION); + return Version("Provides channelmode +d , to deny messages to a channel until seconds.", VF_COMMON | VF_VENDOR, API_VERSION); } void ModuleDelayMsg::OnUserJoin(Membership* memb, bool sync, bool created, CUList&)