summaryrefslogtreecommitdiff
path: root/include/modes.h
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2013-03-13 14:40:49 -0500
committerAdam <Adam@anope.org>2013-03-13 14:40:49 -0500
commit1ff7a7c1f1cee2dfe26a0a72026176202e2e4e6a (patch)
treea492ee7bc3dc23a9ffae40ca1e643d664608e929 /include/modes.h
parent1d16629a6da2f1d5b65557028e75abc7de51cad5 (diff)
Refactor mask/entry code, allow full matching (against users real host/ip) if their displayed host is their real real host. Also match against cloaked host even if full matching is not being done
Diffstat (limited to 'include/modes.h')
-rw-r--r--include/modes.h20
1 files changed, 3 insertions, 17 deletions
diff --git a/include/modes.h b/include/modes.h
index 4b207fa44..a9957e332 100644
--- a/include/modes.h
+++ b/include/modes.h
@@ -393,28 +393,14 @@ class CoreExport ModeManager
static void UpdateDefaultMLock(ServerConfig *config);
};
-/** Entry flags
- */
-enum EntryType
-{
- ENTRYTYPE_CIDR,
- ENTRYTYPE_NICK_WILD,
- ENTRYTYPE_NICK,
- ENTRYTYPE_USER_WILD,
- ENTRYTYPE_USER,
- ENTRYTYPE_HOST_WILD,
- ENTRYTYPE_HOST
-};
-
/** Represents a mask set on a channel (b/e/I)
*/
class CoreExport Entry
{
Anope::string name;
- public:
- std::set<EntryType> types;
- unsigned char cidr_len;
Anope::string mask;
+ public:
+ unsigned short cidr_len;
Anope::string nick, user, host;
/** Constructor
@@ -426,7 +412,7 @@ class CoreExport Entry
/** Get the banned mask for this entry
* @return The mask
*/
- const Anope::string GetMask();
+ const Anope::string GetMask() const;
/** Check if this entry matches a user
* @param u The user