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/protocol/plexus.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/protocol/plexus.cpp')
-rw-r--r-- | modules/protocol/plexus.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/modules/protocol/plexus.cpp b/modules/protocol/plexus.cpp index a804202b3..2ff32c935 100644 --- a/modules/protocol/plexus.cpp +++ b/modules/protocol/plexus.cpp @@ -35,13 +35,13 @@ class PlexusProto : public IRCDProto } void SendSVSKillInternal(const MessageSource &source, User *targ, const Anope::string &reason) override { hybrid->SendSVSKillInternal(source, targ, reason); } - void SendGlobalNotice(BotInfo *bi, const Server *dest, const Anope::string &msg) override { hybrid->SendGlobalNotice(bi, dest, msg); } - void SendGlobalPrivmsg(BotInfo *bi, const Server *dest, const Anope::string &msg) override { hybrid->SendGlobalPrivmsg(bi, dest, msg); } - void SendSQLine(User *u, const XLine *x) override { hybrid->SendSQLine(u, x); } - void SendSQLineDel(const XLine *x) override { hybrid->SendSQLineDel(x); } - void SendSGLineDel(const XLine *x) override { hybrid->SendSGLineDel(x); } - void SendSGLine(User *u, const XLine *x) override { hybrid->SendSGLine(u, x); } - void SendAkillDel(const XLine *x) override { hybrid->SendAkillDel(x); } + void SendGlobalNotice(ServiceBot *bi, const Server *dest, const Anope::string &msg) override { hybrid->SendGlobalNotice(bi, dest, msg); } + void SendGlobalPrivmsg(ServiceBot *bi, const Server *dest, const Anope::string &msg) override { hybrid->SendGlobalPrivmsg(bi, dest, msg); } + void SendSQLine(User *u, XLine *x) override { hybrid->SendSQLine(u, x); } + void SendSQLineDel(XLine *x) override { hybrid->SendSQLineDel(x); } + void SendSGLineDel(XLine *x) override { hybrid->SendSGLineDel(x); } + void SendSGLine(User *u, XLine *x) override { hybrid->SendSGLine(u, x); } + void SendAkillDel(XLine *x) override { hybrid->SendAkillDel(x); } void SendAkill(User *u, XLine *x) override { hybrid->SendAkill(u, x); } void SendServer(const Server *server) override { hybrid->SendServer(server); } void SendChannel(Channel *c) override { hybrid->SendChannel(c); } @@ -67,7 +67,7 @@ class PlexusProto : public IRCDProto if (uc != NULL) uc->status.Clear(); - BotInfo *setter = BotInfo::Find(user->GetUID()); + ServiceBot *setter = ServiceBot::Find(user->GetUID()); for (size_t i = 0; i < cs.Modes().length(); ++i) c->SetMode(setter, ModeManager::FindChannelModeByChar(cs.Modes()[i]), user->GetUID(), false); @@ -144,7 +144,7 @@ class PlexusProto : public IRCDProto void SendLogin(User *u, NickServ::Nick *na) override { - UplinkSocket::Message(Me) << "ENCAP * SU " << u->GetUID() << " " << na->nc->display; + UplinkSocket::Message(Me) << "ENCAP * SU " << u->GetUID() << " " << na->GetAccount()->GetDisplay(); } void SendLogout(User *u) override @@ -282,7 +282,7 @@ struct IRCDMessageUID : IRCDMessage if (params[8] != "0" && !na) na = NickServ::FindNick(params[8]); - User::OnIntroduce(params[0], params[4], params[9], params[5], ip, source.GetServer(), params[10], ts, params[3], params[7], na ? *na->nc : NULL); + User::OnIntroduce(params[0], params[4], params[9], params[5], ip, source.GetServer(), params[10], ts, params[3], params[7], na ? na->GetAccount() : NULL); } }; |