summaryrefslogtreecommitdiff
path: root/modules/protocol/ratbox.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2014-11-24 14:27:23 -0500
committerAdam <Adam@anope.org>2014-11-24 14:27:23 -0500
commit42238034490fb5479d787bd1695750387d508200 (patch)
treec93c62e0e1c936e656ae5b9ee1b62380ce2a194c /modules/protocol/ratbox.cpp
parentd492923610d9c9146b2a2b63de38deab2cfd4ca7 (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/ratbox.cpp')
-rw-r--r--modules/protocol/ratbox.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/modules/protocol/ratbox.cpp b/modules/protocol/ratbox.cpp
index a0d2cf9a2..4156d1fbf 100644
--- a/modules/protocol/ratbox.cpp
+++ b/modules/protocol/ratbox.cpp
@@ -29,14 +29,14 @@ class RatboxProto : 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 SendSGLine(User *u, const XLine *x) override { hybrid->SendSGLine(u, x); }
- void SendSGLineDel(const XLine *x) override { hybrid->SendSGLineDel(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 SendSGLine(User *u, XLine *x) override { hybrid->SendSGLine(u, x); }
+ void SendSGLineDel(XLine *x) override { hybrid->SendSGLineDel(x); }
void SendAkill(User *u, XLine *x) override { hybrid->SendAkill(u, x); }
- void SendAkillDel(const XLine *x) override { hybrid->SendAkillDel(x); }
- void SendSQLineDel(const XLine *x) override { hybrid->SendSQLineDel(x); }
+ void SendAkillDel(XLine *x) override { hybrid->SendAkillDel(x); }
+ void SendSQLineDel(XLine *x) override { hybrid->SendSQLineDel(x); }
void SendJoin(User *user, Channel *c, const ChannelStatus *status) override { hybrid->SendJoin(user, c, status); }
void SendServer(const Server *server) override { hybrid->SendServer(server); }
void SendModeInternal(const MessageSource &source, User *u, const Anope::string &buf) override { hybrid->SendModeInternal(source, u, buf); }
@@ -83,10 +83,10 @@ class RatboxProto : public IRCDProto
void SendLogin(User *u, NickServ::Nick *na) override
{
- if (na->nc->HasExt("UNCONFIRMED"))
+ if (na->GetAccount()->HasFieldS("UNCONFIRMED"))
return;
- 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
@@ -96,7 +96,7 @@ class RatboxProto : public IRCDProto
void SendTopic(const MessageSource &source, Channel *c) override
{
- BotInfo *bi = source.GetBot();
+ ServiceBot *bi = source.GetBot();
bool needjoin = c->FindUser(bi) == NULL;
if (needjoin)
@@ -134,7 +134,7 @@ struct IRCDMessageEncap : IRCDMessage
* their server isn't syncing) and then we receive this.. so tell them about it.
*/
if (u->server->IsSynced())
- u->SendMessage(Config->GetClient("NickServ"), _("You have been logged in as \002%s\002."), nc->display.c_str());
+ u->SendMessage(Config->GetClient("NickServ"), _("You have been logged in as \002%s\002."), nc->GetDisplay().c_str());
}
}
};