summaryrefslogtreecommitdiff
path: root/modules/extra/stats/irc2sql/irc2sql.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/extra/stats/irc2sql/irc2sql.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/extra/stats/irc2sql/irc2sql.cpp')
-rw-r--r--modules/extra/stats/irc2sql/irc2sql.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/extra/stats/irc2sql/irc2sql.cpp b/modules/extra/stats/irc2sql/irc2sql.cpp
index 8c0aa83ab..bc302c575 100644
--- a/modules/extra/stats/irc2sql/irc2sql.cpp
+++ b/modules/extra/stats/irc2sql/irc2sql.cpp
@@ -25,7 +25,7 @@ void IRC2SQL::OnReload(Configuration::Conf *conf)
const Anope::string &snick = block->Get<const Anope::string>("client");
if (snick.empty())
throw ConfigException(Module::name + ": <client> must be defined");
- StatServ = BotInfo::Find(snick, true);
+ StatServ = ServiceBot::Find(snick, true);
if (!StatServ)
throw ConfigException(Module::name + ": no bot named " + snick);
@@ -99,7 +99,7 @@ void IRC2SQL::OnUserConnect(User *u, bool &exempt)
query.SetValue("ident", u->GetIdent());
query.SetValue("vident", u->GetVIdent());
query.SetValue("secure", u->HasMode("SSL") || u->HasExt("ssl") ? "Y" : "N");
- query.SetValue("account", u->Account() ? u->Account()->display : "");
+ query.SetValue("account", u->Account() ? u->Account()->GetDisplay() : "");
query.SetValue("fingerprint", u->fingerprint);
query.SetValue("signon", u->signon);
query.SetValue("server", u->server->GetName());
@@ -158,7 +158,7 @@ void IRC2SQL::OnUserLogin(User *u)
{
query = "UPDATE `" + prefix + "user` SET account=@account@ WHERE nick=@nick@";
query.SetValue("nick", u->nick);
- query.SetValue("account", u->Account() ? u->Account()->display : "");
+ query.SetValue("account", u->Account() ? u->Account()->GetDisplay() : "");
this->RunQuery(query);
}
@@ -255,7 +255,7 @@ void IRC2SQL::OnTopicUpdated(Channel *c, const Anope::string &user, const Anope:
this->RunQuery(query);
}
-void IRC2SQL::OnBotNotice(User *u, BotInfo *bi, Anope::string &message)
+void IRC2SQL::OnBotNotice(User *u, ServiceBot *bi, Anope::string &message)
{
Anope::string versionstr;
if (bi != StatServ)