diff options
| author | Adam <Adam@anope.org> | 2014-05-28 12:07:29 -0400 |
|---|---|---|
| committer | Adam <Adam@anope.org> | 2014-05-28 12:07:54 -0400 |
| commit | f29e1cf383529a1a29f02b0669d973f5ee0b7a66 (patch) | |
| tree | 3c33db276dc9328235bbd572641521ed44458176 /modules/extra/stats | |
| parent | 1253c70e0682fa1490c99c3d2869049a0e3fa2e0 (diff) | |
Move most of the core pseudoclient logic to modules
Diffstat (limited to 'modules/extra/stats')
| -rw-r--r-- | modules/extra/stats/cs_fantasy_stats.cpp | 2 | ||||
| -rw-r--r-- | modules/extra/stats/m_chanstats.cpp | 20 |
2 files changed, 11 insertions, 11 deletions
diff --git a/modules/extra/stats/cs_fantasy_stats.cpp b/modules/extra/stats/cs_fantasy_stats.cpp index b400e23ed..4674e0892 100644 --- a/modules/extra/stats/cs_fantasy_stats.cpp +++ b/modules/extra/stats/cs_fantasy_stats.cpp @@ -113,7 +113,7 @@ class CSStats : public Module channel = params[0]; else { - if (NickAlias *na = NickAlias::Find(params[0])) + if (NickServ::Nick *na = NickServ::FindNick(params[0])) display = na->nc->display; else { diff --git a/modules/extra/stats/m_chanstats.cpp b/modules/extra/stats/m_chanstats.cpp index 4efb1f430..d472fd55d 100644 --- a/modules/extra/stats/m_chanstats.cpp +++ b/modules/extra/stats/m_chanstats.cpp @@ -12,7 +12,7 @@ class CommandCSSetChanstats : public Command void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) override { - ChannelInfo *ci = ChannelInfo::Find(params[0]); + ChanServ::Channel *ci = ChanServ::Find(params[0]); if (!ci) { source.Reply(CHAN_X_NOT_REGISTERED, params[0].c_str()); @@ -65,7 +65,7 @@ class CommandNSSetChanstats : public Command } void Run(CommandSource &source, const Anope::string &user, const Anope::string ¶m, bool saset = false) { - NickAlias *na = NickAlias::Find(user); + NickServ::Nick *na = NickServ::FindNick(user); if (!na) { source.Reply(NICK_X_NOT_REGISTERED, user.c_str()); @@ -103,7 +103,7 @@ class CommandNSSetChanstats : public Command { this->Run(source, source.nc->display, params[0]); } - + bool OnHelp(CommandSource &source, const Anope::string &) override { this->SendSyntax(source); @@ -501,7 +501,7 @@ class MChanstats : public Module Log(this) << "no database connection to " << engine; } - void OnChanInfo(CommandSource &source, ChannelInfo *ci, InfoFormatter &info, bool show_all) override + void OnChanInfo(CommandSource &source, ChanServ::Channel *ci, InfoFormatter &info, bool show_all) override { if (!show_all) return; @@ -509,7 +509,7 @@ class MChanstats : public Module info.AddOption(_("Chanstats")); } - void OnNickInfo(CommandSource &source, NickAlias *na, InfoFormatter &info, bool show_hidden) override + void OnNickInfo(CommandSource &source, NickServ::Nick *na, InfoFormatter &info, bool show_hidden) override { if (!show_hidden) return; @@ -610,14 +610,14 @@ class MChanstats : public Module this->RunQuery(query); } - void OnDelCore(NickCore *nc) override + void OnDelCore(NickServ::Account *nc) override { query = "DELETE FROM `" + prefix + "chanstats` WHERE `nick` = @nick@;"; query.SetValue("nick", nc->display); this->RunQuery(query); } - void OnChangeCoreDisplay(NickCore *nc, const Anope::string &newdisplay) override + void OnChangeCoreDisplay(NickServ::Account *nc, const Anope::string &newdisplay) override { query = "CALL " + prefix + "chanstats_proc_chgdisplay(@old_display@, @new_display@);"; query.SetValue("old_display", nc->display); @@ -625,20 +625,20 @@ class MChanstats : public Module this->RunQuery(query); } - void OnDelChan(ChannelInfo *ci) override + void OnDelChan(ChanServ::Channel *ci) override { query = "DELETE FROM `" + prefix + "chanstats` WHERE `chan` = @channel@;"; query.SetValue("channel", ci->name); this->RunQuery(query); } - void OnChanRegistered(ChannelInfo *ci) + void OnChanRegistered(ChanServ::Channel *ci) { if (CSDefChanstats) ci->Extend<bool>("CS_STATS"); } - void OnNickRegister(User *user, NickAlias *na) + void OnNickRegister(User *user, NickServ::Nick *na) { if (NSDefChanstats) na->nc->Extend<bool>("NS_STATS"); |
