diff options
Diffstat (limited to 'modules/commands/os_chankill.cpp')
-rw-r--r-- | modules/commands/os_chankill.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/modules/commands/os_chankill.cpp b/modules/commands/os_chankill.cpp index 3fea40043..713b5922f 100644 --- a/modules/commands/os_chankill.cpp +++ b/modules/commands/os_chankill.cpp @@ -30,7 +30,6 @@ class CommandOSChanKill : public Command return; Anope::string expiry, channel; - time_t expires; unsigned last_param = 1; Channel *c; @@ -42,7 +41,7 @@ class CommandOSChanKill : public Command last_param = 2; } - expires = !expiry.empty() ? Anope::DoTime(expiry) : Config->ChankillExpiry; + time_t expires = !expiry.empty() ? Anope::DoTime(expiry) : Config->GetModule("operserv")->Get<time_t>("autokillexpiry", "30d"); if (!expiry.empty() && isdigit(expiry[expiry.length() - 1])) expires *= 86400; if (expires && expires < 60) @@ -65,7 +64,7 @@ class CommandOSChanKill : public Command if (!reason.empty()) { Anope::string realreason; - if (Config->AddAkiller) + if (Config->GetBlock("operserv")->Get<bool>("addakiller") && !source.GetNick().empty()) realreason = "[" + source.GetNick() + "] " + reason; else realreason = reason; @@ -74,7 +73,7 @@ class CommandOSChanKill : public Command { for (Channel::ChanUserList::iterator it = c->users.begin(), it_end = c->users.end(); it != it_end; ) { - ChanUserContainer *uc = *it++; + ChanUserContainer *uc = it->second; if (uc->user->server == Me || uc->user->HasMode("OPER")) continue; @@ -108,10 +107,9 @@ class OSChanKill : public Module CommandOSChanKill commandoschankill; public: - OSChanKill(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, CORE), + OSChanKill(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, VENDOR), commandoschankill(this) { - this->SetAuthor("Anope"); } }; |