diff options
| author | Adam <Adam@anope.org> | 2016-11-11 12:58:14 -0500 |
|---|---|---|
| committer | Adam <Adam@anope.org> | 2016-11-11 12:58:14 -0500 |
| commit | ef5b6919e3508cc9d4c722285d9d56f5a275f650 (patch) | |
| tree | 56497f0a4f5d1847bae511c72bdb2d3581df58ef /include | |
| parent | 8dd6e3195ed7600e39935e887df2626215733dfb (diff) | |
Fix opers not really being serializable
Diffstat (limited to 'include')
| -rw-r--r-- | include/modules/nickserv/account.h | 17 | ||||
| -rw-r--r-- | include/opertype.h | 6 |
2 files changed, 7 insertions, 16 deletions
diff --git a/include/modules/nickserv/account.h b/include/modules/nickserv/account.h index c5717cf91..f0ba144f7 100644 --- a/include/modules/nickserv/account.h +++ b/include/modules/nickserv/account.h @@ -31,20 +31,13 @@ class CoreExport Account : public Serialize::Object public: static constexpr const char *const NAME = "account"; - /* Set if this user is a services operattor. o->ot must exist. */ - Serialize::Reference<Oper> o; - - /* Unsaved data */ - /* Last time an email was sent to this user */ time_t lastmail = 0; /* Users online now logged into this account */ std::vector<User *> users; - protected: using Serialize::Object::Object; - public: virtual Anope::string GetDisplay() anope_abstract; virtual void SetDisplay(const Anope::string &) anope_abstract; @@ -57,16 +50,14 @@ class CoreExport Account : public Serialize::Object virtual Anope::string GetLanguage() anope_abstract; virtual void SetLanguage(const Anope::string &) anope_abstract; + virtual Oper *GetOper() anope_abstract; + virtual void SetOper(Oper *) anope_abstract; + /** Changes the display for this account * @param na The new display, must be grouped to this account. */ virtual void SetDisplay(Nick *na) anope_abstract; - /** Checks whether this account is a services oper or not. - * @return True if this account is a services oper, false otherwise. - */ - virtual bool IsServicesOper() const anope_abstract; - /** Is the given user on this accounts access list? * * @param u The user @@ -80,4 +71,4 @@ class CoreExport Account : public Serialize::Object virtual unsigned int GetChannelCount() anope_abstract; }; -} // namespace NickServ
\ No newline at end of file +} // namespace NickServ diff --git a/include/opertype.h b/include/opertype.h index da8460e44..2d36dfad6 100644 --- a/include/opertype.h +++ b/include/opertype.h @@ -33,9 +33,6 @@ class Oper : public Serialize::Object public: static constexpr const char *const NAME = "oper"; - Configuration::Conf *conf = nullptr; - Module *owner = nullptr; - using Serialize::Object::Object; Anope::string GetName(); @@ -59,6 +56,9 @@ class Oper : public Serialize::Object bool GetRequireOper(); void SetRequireOper(const bool &); + bool HasCommand(const Anope::string &cmdstr); + bool HasPriv(const Anope::string &cmdstr); + /** Find an oper block by name * @param name The name * @return the oper block |
