+ }
+
+ void DisplayList(userrec* user, chanrec* channel)
+ {
+ FounderProtectBase::DisplayList(user,channel);
+ }
+};
+
+/** Abstraction of FounderProtectBase for channel mode +a
+ */
+class ChanProtect : public ModeHandler, public FounderProtectBase
+{
+ char* dummyptr;
+ public:
+ ChanProtect(InspIRCd* Instance, bool using_prefixes, bool depriv_self)
+ : ModeHandler(Instance, 'a', 1, 1, true, MODETYPE_CHANNEL, false, using_prefixes ? '&' : 0),
+ FounderProtectBase(Instance,"cm_protect_","protected user", 388, 389, depriv_self) { }
+
+ unsigned int GetPrefixRank()
+ {
+ return PROTECT_VALUE;
+ }
+
+ ModePair ModeSet(userrec* source, userrec* dest, chanrec* channel, const std::string ¶meter)
+ {
+ return FounderProtectBase::ModeSet(source, dest, channel, parameter);
+ }
+
+ void RemoveMode(chanrec* channel)
+ {
+ FounderProtectBase::RemoveMode(channel, this->GetModeChar());
+ }
+
+ void RemoveMode(userrec* user)
+ {
+ }
+
+ ModeAction OnModeChange(userrec* source, userrec* dest, chanrec* channel, std::string ¶meter, bool adding)
+ {
+ userrec* theuser = FounderProtectBase::FindAndVerify(parameter, channel);
+
+ if (!theuser)
+ return MODEACTION_DENY;
+
+ std::string founder = "cm_founder_"+std::string(channel->name);