summaryrefslogtreecommitdiff
path: root/modules/hostserv/main
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2017-02-07 17:20:07 -0500
committerAdam <Adam@anope.org>2017-02-07 17:20:07 -0500
commit09dca29c8898916772c2a2a6b86b625c812007ed (patch)
tree1b28f4751feec3ea2b46fa0afb061da7926f3a47 /modules/hostserv/main
parent8b694bc392c36551e428b84454efb81cdbc8bcd3 (diff)
Normalize databases by not allowing generic Object references
Remove redis database support
Diffstat (limited to 'modules/hostserv/main')
-rw-r--r--modules/hostserv/main/vhost.cpp9
-rw-r--r--modules/hostserv/main/vhost.h6
-rw-r--r--modules/hostserv/main/vhosttype.cpp2
-rw-r--r--modules/hostserv/main/vhosttype.h2
4 files changed, 10 insertions, 9 deletions
diff --git a/modules/hostserv/main/vhost.cpp b/modules/hostserv/main/vhost.cpp
index 635e3a5b4..7c08fe838 100644
--- a/modules/hostserv/main/vhost.cpp
+++ b/modules/hostserv/main/vhost.cpp
@@ -18,15 +18,16 @@
*/
#include "vhosttype.h"
+#include "modules/nickserv.h"
-Serialize::Object *VHostImpl::GetOwner()
+NickServ::Account *VHostImpl::GetAccount()
{
- return Get(&VHostType::owner);
+ return Get(&VHostType::account);
}
-void VHostImpl::SetOwner(Serialize::Object *owner)
+void VHostImpl::SetAccount(NickServ::Account *acc)
{
- Set(&VHostType::owner, owner);
+ Set(&VHostType::account, acc);
}
Anope::string VHostImpl::GetIdent()
diff --git a/modules/hostserv/main/vhost.h b/modules/hostserv/main/vhost.h
index bdc6509d7..b96e20644 100644
--- a/modules/hostserv/main/vhost.h
+++ b/modules/hostserv/main/vhost.h
@@ -25,7 +25,7 @@ class VHostImpl : public HostServ::VHost
{
friend class VHostType;
- Serialize::Storage<Serialize::Object *> owner;
+ Serialize::Storage<NickServ::Account *> account;
Serialize::Storage<Anope::string> vident;
Serialize::Storage<Anope::string> vhost;
Serialize::Storage<Anope::string> creator;
@@ -35,8 +35,8 @@ class VHostImpl : public HostServ::VHost
public:
using HostServ::VHost::VHost;
- Serialize::Object *GetOwner() override;
- void SetOwner(Serialize::Object *) override;
+ NickServ::Account *GetAccount() override;
+ void SetAccount(NickServ::Account *) override;
Anope::string GetIdent() override;
void SetIdent(const Anope::string &) override;
diff --git a/modules/hostserv/main/vhosttype.cpp b/modules/hostserv/main/vhosttype.cpp
index ee73840bf..76ac5476b 100644
--- a/modules/hostserv/main/vhosttype.cpp
+++ b/modules/hostserv/main/vhosttype.cpp
@@ -21,7 +21,7 @@
#include "vhosttype.h"
VHostType::VHostType(Module *me) : Serialize::Type<VHostImpl>(me)
- , owner(this, "owner", &VHostImpl::owner, true)
+ , account(this, "account", &VHostImpl::account, true)
, vident(this, "vident", &VHostImpl::vident)
, vhost(this, "vhost", &VHostImpl::vhost)
, creator(this, "creator", &VHostImpl::creator)
diff --git a/modules/hostserv/main/vhosttype.h b/modules/hostserv/main/vhosttype.h
index 3be60f518..945110563 100644
--- a/modules/hostserv/main/vhosttype.h
+++ b/modules/hostserv/main/vhosttype.h
@@ -22,7 +22,7 @@
class VHostType : public Serialize::Type<VHostImpl>
{
public:
- Serialize::ObjectField<VHostImpl, Serialize::Object *> owner;
+ Serialize::ObjectField<VHostImpl, NickServ::Account *> account;
Serialize::Field<VHostImpl, Anope::string> vident;
Serialize::Field<VHostImpl, Anope::string> vhost;
Serialize::Field<VHostImpl, Anope::string> creator;