From 83243793468c7af887404ca30c34146436682610 Mon Sep 17 00:00:00 2001 From: rburchell Date: Sun, 15 Feb 2009 15:22:20 +0000 Subject: Can now correctly tie users to opertypes. git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2063 5417fbe8-f217-4b02-8779-1006273d7864 --- include/opertype.h | 8 ++++++-- include/services.h | 8 ++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) (limited to 'include') 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 > svsopers_in_config; +/** List of available opertypes. + */ +extern std::list MyOperTypes; + #endif /* SERVICES_H */ -- cgit