summaryrefslogtreecommitdiff
path: root/modules/database/flatfile.cpp
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/database/flatfile.cpp
parent8b694bc392c36551e428b84454efb81cdbc8bcd3 (diff)
Normalize databases by not allowing generic Object references
Remove redis database support
Diffstat (limited to 'modules/database/flatfile.cpp')
-rw-r--r--modules/database/flatfile.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/modules/database/flatfile.cpp b/modules/database/flatfile.cpp
index 27a51539c..ec6911ce2 100644
--- a/modules/database/flatfile.cpp
+++ b/modules/database/flatfile.cpp
@@ -129,7 +129,7 @@ class DBFlatFile : public Module
HostServ::VHost *vhost = Serialize::New<HostServ::VHost *>();
if (vhost != nullptr)
{
- vhost->SetOwner(acc);
+ vhost->SetAccount(acc);
vhost->SetIdent(data["vhost_ident"]);
vhost->SetHost(data["vhost_host"]);
vhost->SetCreator(data["vhost_creator"]);
@@ -352,7 +352,7 @@ class DBFlatFile : public Module
NickServ::Nick *nick = NickServ::FindNick(mask);
if (nick != nullptr)
- access->SetObj(nick->GetAccount());
+ access->SetAccount(nick->GetAccount());
access->AccessUnserialize(data["data"]);
}
@@ -557,18 +557,18 @@ class DBFlatFile : public Module
void LoadOperInfo(const Anope::string &type, std::map<Anope::string, Anope::string> &data)
{
- Serialize::Object *target = NickServ::FindAccount(data["target"]);
- if (target == nullptr)
- target = ChanServ::Find(data["target"]);
+ NickServ::Account *acc = NickServ::FindAccount(data["target"]);
+ ChanServ::Channel *chan = ChanServ::Find(data["target"]);
- if (target == nullptr)
+ if (acc == nullptr && chan == nullptr)
return;
OperInfo *o = Serialize::New<OperInfo *>();
if (o == nullptr)
return;
- o->SetTarget(target);
+ o->SetAccount(acc);
+ o->SetChannel(chan);
o->SetInfo(data["info"]);
o->SetCreator(data["adder"]);
try