summaryrefslogtreecommitdiff
path: root/include/modes.h
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2011-03-07 19:54:51 -0500
committerAdam <Adam@anope.org>2011-03-07 19:54:51 -0500
commit8eb23e7d489239e8af79c2d6da587cd1c3a81b5d (patch)
tree04bf54ceb46a4b18345cf4e01d8aeb11ccd52c07 /include/modes.h
parent093b3d258e7b14d2aa057ca6113de034b5063efe (diff)
Added support for extbans
Diffstat (limited to 'include/modes.h')
-rw-r--r--include/modes.h48
1 files changed, 9 insertions, 39 deletions
diff --git a/include/modes.h b/include/modes.h
index e423b370e..ae89c7ab7 100644
--- a/include/modes.h
+++ b/include/modes.h
@@ -222,6 +222,14 @@ class CoreExport ChannelModeList : public ChannelMode
*/
virtual bool IsValid(const Anope::string &mask) const { return true; }
+ /** Checks if mask affects user
+ * Should only be used for extbans or other weird ircd-specific things.
+ * @param u The user
+ * @param e The entry to match against
+ * @return true on match
+ */
+ virtual bool Matches(User *u, const Entry *e) { return false; }
+
/** Called when a mask is added to a channel
* @param chan The channel
* @param mask The mask
@@ -233,7 +241,6 @@ class CoreExport ChannelModeList : public ChannelMode
* @param mask The mask
*/
virtual void OnDel(Channel *chan, const Anope::string &mask) { }
-
};
/** This is a mode with a paramater, eg +k/l. These modes should use/inherit from this
@@ -287,38 +294,11 @@ class CoreExport ChannelModeStatus : public ChannelMode
class CoreExport ChannelModeBan : public ChannelModeList
{
public:
- ChannelModeBan(char modeChar) : ChannelModeList(CMODE_BAN, modeChar) { }
+ ChannelModeBan(ChannelModeName mName, char modeChar) : ChannelModeList(mName, modeChar) { }
void OnAdd(Channel *chan, const Anope::string &mask);
-
- void OnDel(Channel *chan, const Anope::string &mask);
};
-/** Channel mode +e
- */
-class CoreExport ChannelModeExcept : public ChannelModeList
-{
- public:
- ChannelModeExcept(char modeChar) : ChannelModeList(CMODE_EXCEPT, modeChar) { }
-
- void OnAdd(Channel *chan, const Anope::string &mask);
-
- void OnDel(Channel *chan, const Anope::string &mask);
-};
-
-/** Channel mode +I
- */
-class CoreExport ChannelModeInvex : public ChannelModeList
-{
- public:
- ChannelModeInvex(char modeChar) : ChannelModeList(CMODE_INVITEOVERRIDE, modeChar) { }
-
- void OnAdd(Channel *chan, const Anope::string &mask);
-
- void OnDel(Channel *chan, const Anope::string &mask);
-};
-
-
/** Channel mode +k (key)
*/
class CoreExport ChannelModeKey : public ChannelModeParam
@@ -329,16 +309,6 @@ class CoreExport ChannelModeKey : public ChannelModeParam
bool IsValid(const Anope::string &value) const;
};
-/** Channel mode +f (flood)
- */
-class ChannelModeFlood : public ChannelModeParam
-{
- public:
- ChannelModeFlood(char modeChar, bool minusNoArg = false) : ChannelModeParam(CMODE_FLOOD, modeChar, minusNoArg) { }
-
- bool IsValid(const Anope::string &value) const;
-};
-
/** This class is used for channel mode +A (Admin only)
* Only opers can mlock it
*/