class InviteException : public ListModeBase
{
public:
- InviteException(InspIRCd* Instance) : ListModeBase(Instance, 'I', "End of Channel Invite Exception List", 346, 347, true) { }
+ InviteException(InspIRCd* Instance, Module* Creator) : ListModeBase(Instance, Creator, 'I', "End of Channel Invite Exception List", 346, 347, true) { }
};
class ModuleInviteException : public Module
{
InviteException ie;
public:
- ModuleInviteException(InspIRCd* Me) : Module(Me), ie(Me)
+ ModuleInviteException(InspIRCd* Me) : Module(Me), ie(Me, this)
{
if (!ServerInstance->Modes->AddMode(&ie))
throw ModuleException("Could not add new modes!");
output.append(" INVEX=I");
}
- virtual int OnCheckInvite(User* user, Channel* chan)
+ virtual ModResult OnCheckInvite(User* user, Channel* chan)
{
if(chan != NULL)
{
if(InspIRCd::Match(user->GetFullRealHost(), it->mask) || InspIRCd::Match(user->GetFullHost(), it->mask) || (InspIRCd::MatchCIDR(mask, it->mask)))
{
// They match an entry on the list, so let them in.
- return 1;
+ return MOD_RES_DENY;
}
}
}
// or if there wasn't a list, there can't be anyone on it, so we don't need to do anything.
}
- return 0;
+ return MOD_RES_PASSTHRU;
}
virtual const char* OnRequest(Request* request)