diff options
Diffstat (limited to 'modules/commands/cs_log.cpp')
-rw-r--r-- | modules/commands/cs_log.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/modules/commands/cs_log.cpp b/modules/commands/cs_log.cpp index 4965ab561..41d8229f6 100644 --- a/modules/commands/cs_log.cpp +++ b/modules/commands/cs_log.cpp @@ -1,6 +1,6 @@ /* ChanServ core functions * - * (C) 2003-2012 Anope Team + * (C) 2003-2013 Anope Team * Contact us at team@anope.org * * Please read COPYING and README for further details. @@ -117,7 +117,7 @@ public: { if (log->extra == extra) { - log->Destroy(); + delete log; ci->log_settings->erase(ci->log_settings->begin() + i - 1); Log(override ? LOG_OVERRIDE : LOG_COMMAND, source, this, ci) << "to remove logging for " << command << " with method " << method << (extra == "" ? "" : " ") << extra; source.Reply(_("Logging for command %s on %s with log method %s%s%s has been removed."), command_name.c_str(), bi->nick.c_str(), method.c_str(), extra.empty() ? "" : " ", extra.empty() ? "" : extra.c_str()); @@ -181,10 +181,12 @@ public: class CSLog : public Module { + ServiceReference<MemoServService> MSService; CommandCSLog commandcslog; public: - CSLog(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), commandcslog(this) + CSLog(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + MSService("MemoServService", "MemoServ"), commandcslog(this) { this->SetAuthor("Anope"); @@ -212,8 +214,8 @@ class CSLog : public Module } else if (log->method.equals_ci("NOTICE") && l->ci->c && l->ci->bi && l->ci->c->FindUser(l->ci->bi) != NULL) IRCD->SendNotice(l->ci->bi, log->extra + l->ci->c->name, "%s", buffer.c_str()); - else if (log->method.equals_ci("MEMO") && MemoServService && l->ci->WhoSends() != NULL) - MemoServService->Send(l->ci->WhoSends()->nick, l->ci->name, buffer, true); + else if (log->method.equals_ci("MEMO") && MSService && l->ci->WhoSends() != NULL) + MSService->Send(l->ci->WhoSends()->nick, l->ci->name, buffer, true); } } } |