summaryrefslogtreecommitdiff
path: root/modules/extra/stats/m_chanstats.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/extra/stats/m_chanstats.cpp')
-rw-r--r--modules/extra/stats/m_chanstats.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/modules/extra/stats/m_chanstats.cpp b/modules/extra/stats/m_chanstats.cpp
index 7a2fe0486..27b1b3eae 100644
--- a/modules/extra/stats/m_chanstats.cpp
+++ b/modules/extra/stats/m_chanstats.cpp
@@ -517,14 +517,13 @@ class MChanstats : public Module
info.AddOption(_("Chanstats"));
}
- void OnTopicUpdated(Channel *c, const Anope::string &user, const Anope::string &topic) anope_override
+ void OnTopicUpdated(User *source, Channel *c, const Anope::string &user, const Anope::string &topic) anope_override
{
- User *u = User::Find(user);
- if (!u || !u->Account() || !c->ci || !cs_stats.HasExt(c->ci))
+ if (!source || !source->Account() || !c->ci || !cs_stats.HasExt(c->ci))
return;
query = "CALL " + prefix + "chanstats_proc_update(@channel@, @nick@, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1);";
query.SetValue("channel", c->name);
- query.SetValue("nick", GetDisplay(u));
+ query.SetValue("nick", GetDisplay(source));
this->RunQuery(query);
}