summaryrefslogtreecommitdiff
path: root/include/protocol.h
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2013-01-21 22:31:16 -0500
committerAdam <Adam@anope.org>2013-01-21 22:31:16 -0500
commitddaa001dafb5122e6e363e4acbbe6ce045b7b104 (patch)
tree0364a76606ac6e2881ebd663601ce260f7c1101e /include/protocol.h
parent51c049e1a738e9124bab3961f35b830906517421 (diff)
Merge usefulness of Flags and Extensible classes into Extensible, made most flags we have juse strings instead of defines/enums
Diffstat (limited to 'include/protocol.h')
-rw-r--r--include/protocol.h20
1 files changed, 12 insertions, 8 deletions
diff --git a/include/protocol.h b/include/protocol.h
index 4603e4eea..385448662 100644
--- a/include/protocol.h
+++ b/include/protocol.h
@@ -224,13 +224,6 @@ class CoreExport IRCDProto : public Service
virtual bool IsHostValid(const Anope::string &);
};
-enum IRCDMessageFlag
-{
- IRCDMESSAGE_SOFT_LIMIT,
- IRCDMESSAGE_REQUIRE_SERVER,
- IRCDMESSAGE_REQUIRE_USER
-};
-
class CoreExport MessageSource
{
Anope::string source;
@@ -247,14 +240,25 @@ class CoreExport MessageSource
Server *GetServer();
};
-class CoreExport IRCDMessage : public Flags<IRCDMessageFlag>, public Service
+enum IRCDMessageFlag
+{
+ IRCDMESSAGE_SOFT_LIMIT,
+ IRCDMESSAGE_REQUIRE_SERVER,
+ IRCDMESSAGE_REQUIRE_USER
+};
+
+class CoreExport IRCDMessage : public Service
{
Anope::string name;
unsigned param_count;
+ std::set<IRCDMessageFlag> flags;
public:
IRCDMessage(Module *owner, const Anope::string &n, unsigned p = 0);
unsigned GetParamCount() const;
virtual void Run(MessageSource &, const std::vector<Anope::string> &params) = 0;
+
+ void SetFlag(IRCDMessageFlag f) { flags.insert(f); }
+ bool HasFlag(IRCDMessageFlag f) const { return flags.count(f); }
};
extern CoreExport IRCDProto *IRCD;