class AuditoriumMode : public ModeHandler
{
public:
- AuditoriumMode(InspIRCd* Instance) : ModeHandler(Instance, 'u', 0, 0, false, MODETYPE_CHANNEL, false, 0, '@') { }
+ AuditoriumMode(InspIRCd* Instance, Module* Creator) : ModeHandler(Instance, Creator, 'u', 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)
{
if (channel->IsModeSet('u') != adding)
{
bool OperOverride;
public:
ModuleAuditorium(InspIRCd* Me)
- : Module(Me), aum(Me)
+ : Module(Me), aum(Me, this)
{
if (!ServerInstance->Modes->AddMode(&aum))
throw ModuleException("Could not add new modes!");
}
}
- virtual void OnUserJoin(User* user, Channel* channel, bool sync, bool &silent)
+ virtual void OnUserJoin(User* user, Channel* channel, bool sync, bool &silent, bool created)
{
if (channel->IsModeSet('u'))
{
}
}
- bool OnHostCycle(User* user)
+ ModResult OnHostCycle(User* user)
{
for (UCListIter f = user->chans.begin(); f != user->chans.end(); f++)
if (f->first->IsModeSet('u'))
- return true;
+ return MOD_RES_DENY;
- return false;
+ return MOD_RES_PASSTHRU;
}
void OnUserQuit(User* user, const std::string &reason, const std::string &oper_message)