X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_delaymsg.cpp;h=75a1df19a92050cdacc960953acdc3d2226b47db;hb=c4d6ce8c5e1802e5b834d5845e31c3adf7700585;hp=1673d05baf700021ae05035f4ba60fb2790f37c6;hpb=1524caf2f799cff54c2de330c9670a0b761ba3d8;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_delaymsg.cpp b/src/modules/m_delaymsg.cpp index 1673d05ba..75a1df19a 100644 --- a/src/modules/m_delaymsg.cpp +++ b/src/modules/m_delaymsg.cpp @@ -22,7 +22,7 @@ class DelayMsgMode : public ModeHandler CUList empty; public: LocalIntExt jointime; - DelayMsgMode(InspIRCd* Instance, Module* Parent) : ModeHandler(Parent, 'd', PARAM_SETONLY, MODETYPE_CHANNEL) + DelayMsgMode(Module* Parent) : ModeHandler(Parent, "delaymsg", 'd', PARAM_SETONLY, MODETYPE_CHANNEL) , jointime("delaymsg", Parent) { levelrequired = OP_VALUE; @@ -41,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())); } @@ -54,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!"); @@ -96,12 +96,11 @@ ModeAction DelayMsgMode::OnModeChange(User* source, User* dest, Channel* channel ModuleDelayMsg::~ModuleDelayMsg() { - ServerInstance->Modes->DelMode(&djm); } 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&)