public:
DelayJoinMode(InspIRCd* Instance, Module* Parent) : ModeHandler(Instance, Parent, 'D', 0, 0, false, MODETYPE_CHANNEL, false, 0, '@') {};
- ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding, bool);
+ ModeAction OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding);
};
class ModuleDelayJoin : public Module
virtual void OnNamesListItem(User* issuer, User* user, Channel* channel, std::string &prefixes, std::string &nick);
virtual void OnUserJoin(User* user, Channel* channel, bool sync, bool &silent, bool created);
void CleanUser(User* user);
- bool OnHostCycle(User* user);
+ ModResult OnHostCycle(User* user);
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 OnUserQuit(User* user, const std::string &reason, const std::string &oper_message);
/* $ModDesc: Allows for delay-join channels (+D) where users dont appear to join until they speak */
-ModeAction DelayJoinMode::OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding, bool)
+ModeAction DelayJoinMode::OnModeChange(User* source, User* dest, Channel* channel, std::string ¶meter, bool adding)
{
/* no change */
if (channel->IsModeSet('D') == adding)
}
}
-bool ModuleDelayJoin::OnHostCycle(User* user)
+ModResult ModuleDelayJoin::OnHostCycle(User* user)
{
- return user->GetExt("delayjoin");
+ return user->GetExt("delayjoin") ? MOD_RES_DENY : MOD_RES_PASSTHRU;
}
void ModuleDelayJoin::OnUserQuit(User* user, const std::string &reason, const std::string &oper_message)
if (user == i->first)
continue;
- /* Users with a visibility state that hides them dont appear */
- if (user->Visibility && !user->Visibility->VisibleTo(i->first))
- continue;
-
i->first->Write(std::string(tb));
}
}