summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorrburchell <rburchell@5417fbe8-f217-4b02-8779-1006273d7864>2009-02-15 15:22:20 +0000
committerrburchell <rburchell@5417fbe8-f217-4b02-8779-1006273d7864>2009-02-15 15:22:20 +0000
commit83243793468c7af887404ca30c34146436682610 (patch)
tree11f6fb7ffd31bd3b2b6aab1a817d907db017f452 /include
parent855847f428412e85087384df73096d9056526937 (diff)
Can now correctly tie users to opertypes.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2063 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'include')
-rw-r--r--include/opertype.h8
-rw-r--r--include/services.h8
2 files changed, 14 insertions, 2 deletions
diff --git a/include/opertype.h b/include/opertype.h
index 9d5e77224..d6a3c4306 100644
--- a/include/opertype.h
+++ b/include/opertype.h
@@ -40,13 +40,13 @@ class OperType
* @param cmdstr The string to check, e.g. botserv/set/private.
* @return True if this opertype may run the specified command, false otherwise.
*/
- bool HasCommand(const std::string &cmdstr);
+ bool HasCommand(const std::string &cmdstr) const;
/** Check whether this opertype has access to the given special permission.
* @param privstr The priv to check for, e.g. users/auspex.
* @return True if this opertype has the specified priv, false otherwise.
*/
- bool HasPriv(const std::string &privstr);
+ bool HasPriv(const std::string &privstr) const;
/** Add the specified command to this opertype.
* @param cmdstr The command mask to grant this opertype access to, e.g: nickserv/ *, chanserv/set/ *, botserv/set/private.
@@ -57,4 +57,8 @@ class OperType
* @param privstr The specified mask of privs to grant this opertype access to, e.g. users/auspex, users/ *, etc.
*/
void AddPriv(const std::string &privstr);
+
+ /** Returns the name of this opertype.
+ */
+ const std::string &GetName() const;
};
diff --git a/include/services.h b/include/services.h
index 6f7353111..549d39ba1 100644
--- a/include/services.h
+++ b/include/services.h
@@ -1377,4 +1377,12 @@ class Anope
/*************************************************************************/
+/** Pair of nick/opertype lookup. It's stored like this currently, because config is parsed before db load.
+ * XXX: It would be nice to not need this. UGH.
+ */
+extern std::list<std::pair<std::string, std::string> > svsopers_in_config;
+/** List of available opertypes.
+ */
+extern std::list<OperType *> MyOperTypes;
+
#endif /* SERVICES_H */