+ FounderProtectBase::DisplayList(user,channel);
+ }
+};
+
+/** Abstraction of FounderProtectBase for channel mode +a
+ */
+class ChanProtect : public ModeHandler, public FounderProtectBase
+{
+ public:
+ ChanProtect(Module* Creator)
+ : ModeHandler(Creator, "admin", 'a', PARAM_ALWAYS, MODETYPE_CHANNEL),
+ FounderProtectBase('a',"protected user", 388, 389)
+ {
+ ModeHandler::list = true;
+ levelrequired = PROTECT_VALUE;
+ m_paramtype = TR_NICK;
+ }
+
+ void setPrefix(int pfx)
+ {
+ prefix = pfx;
+ }
+
+
+ unsigned int GetPrefixRank()
+ {
+ return PROTECT_VALUE;
+ }
+
+ void RemoveMode(Channel* channel, irc::modestacker* stack)
+ {
+ FounderProtectBase::RemoveMode(channel, stack);
+ }
+
+ void RemoveMode(User* user, irc::modestacker* stack)
+ {
+ }
+
+ ModResult AccessCheck(User* source, Channel* channel, std::string ¶meter, bool adding)
+ {
+ User* theuser = ServerInstance->FindNick(parameter);
+ // source has +q
+ if (channel->GetPrefixValue(source) > PROTECT_VALUE)
+ return MOD_RES_ALLOW;
+
+ // removing own privs?
+ if (source == theuser && !adding && settings.DeprivSelf)
+ return MOD_RES_ALLOW;
+
+ if (!adding && FounderProtectBase::CanRemoveOthers(source, channel))