diff options
| author | Adam <Adam@anope.org> | 2014-11-24 14:27:23 -0500 |
|---|---|---|
| committer | Adam <Adam@anope.org> | 2014-11-24 14:27:23 -0500 |
| commit | 42238034490fb5479d787bd1695750387d508200 (patch) | |
| tree | c93c62e0e1c936e656ae5b9ee1b62380ce2a194c /modules/pseudoclients/hostserv.cpp | |
| parent | d492923610d9c9146b2a2b63de38deab2cfd4ca7 (diff) | |
Rewrite serializable to have field level granularity
Represent serializable objects in a digraph, and as a result made most
object relationships implicitly defined, and use the graph to trace
references between objects to determine relationships. Edges may
also be marked as having a dependency of the object they point to,
which allows for automatic cleanup and deletion of most objects when
no longer needed.
Additionally, this allows not having to require in-memory copies of
everything when using external databases. db_sql has been rewritten
for this and now always requires a database to function. db_sql with
MySQL now requires InnoDB to make use of transactions and foreign
key constraints.
Diffstat (limited to 'modules/pseudoclients/hostserv.cpp')
| -rw-r--r-- | modules/pseudoclients/hostserv.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/modules/pseudoclients/hostserv.cpp b/modules/pseudoclients/hostserv.cpp index f99d0712a..bc9baee43 100644 --- a/modules/pseudoclients/hostserv.cpp +++ b/modules/pseudoclients/hostserv.cpp @@ -21,7 +21,7 @@ class HostServCore : public Module , public EventHook<Event::SetVhost> , public EventHook<Event::DeleteVhost> { - Reference<BotInfo> HostServ; + Reference<ServiceBot> HostServ; public: HostServCore(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, PSEUDOCLIENT | VENDOR) @@ -42,7 +42,7 @@ class HostServCore : public Module if (hsnick.empty()) throw ConfigException(Module::name + ": <client> must be defined"); - BotInfo *bi = BotInfo::Find(hsnick, true); + ServiceBot *bi = ServiceBot::Find(hsnick, true); if (!bi) throw ConfigException(Module::name + ": no bot named " + hsnick); @@ -54,9 +54,9 @@ class HostServCore : public Module if (!IRCD->CanSetVHost) return; - const NickServ::Nick *na = NickServ::FindNick(u->nick); - if (!na || na->nc != u->Account() || !na->HasVhost()) - na = NickServ::FindNick(u->Account()->display); + NickServ::Nick *na = NickServ::FindNick(u->nick); + if (!na || na->GetAccount() != u->Account() || !na->HasVhost()) + na = NickServ::FindNick(u->Account()->GetDisplay()); if (!na || !na->HasVhost()) return; @@ -101,9 +101,9 @@ class HostServCore : public Module { if (Config->GetModule(this)->Get<bool>("activate_on_set")) { - User *u = User::Find(na->nick); + User *u = User::Find(na->GetNick()); - if (u && u->Account() == na->nc) + if (u && u->Account() == na->GetAccount()) { IRCD->SendVhost(u, na->GetVhostIdent(), na->GetVhostHost()); @@ -128,9 +128,9 @@ class HostServCore : public Module { if (Config->GetModule(this)->Get<bool>("activate_on_set")) { - User *u = User::Find(na->nick); + User *u = User::Find(na->GetNick()); - if (u && u->Account() == na->nc) + if (u && u->Account() == na->GetAccount()) IRCD->SendVhostDel(u); } } |
