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(InspIRCd* Instance, 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)
{
}
~ModuleDelayMsg();
Version GetVersion();
- void OnUserJoin(User* user, Channel* channel, bool sync, bool &silent, bool created);
- void OnUserPart(User* user, Channel* channel, std::string &partmessage, bool &silent);
- void OnUserKick(User* source, User* user, Channel* chan, const std::string &reason, bool &silent);
- void OnCleanup(int target_type, void* item);
+ void OnUserJoin(Membership* memb, bool sync, bool created, CUList&);
ModResult OnUserPreMessage(User* user, void* dest, int target_type, std::string &text, char status, CUList &exempt_list);
};
return Version("$Id$", VF_COMMON | VF_VENDOR, API_VERSION);
}
-void ModuleDelayMsg::OnUserJoin(User* user, Channel* channel, bool sync, bool &silent, bool created)
+void ModuleDelayMsg::OnUserJoin(Membership* memb, bool sync, bool created, CUList&)
{
- if (channel->IsModeSet('d'))
+ if (memb->chan->IsModeSet('d'))
{
- Membership* memb = channel->GetUser(user);
djm.jointime.set(memb, ServerInstance->Time());
}
}