summaryrefslogtreecommitdiff
path: root/modules/commands/os_chankill.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2013-05-05 01:55:04 -0400
committerAdam <Adam@anope.org>2013-05-05 01:55:04 -0400
commit1d0bb9b26b7ad58ab0bf979ac046f4511b3bf12b (patch)
tree4486f0784bdf050fd7eb225c0cb9df352ce1f45a /modules/commands/os_chankill.cpp
parent781defb7076ddfddf723ca08cd0a518b6657b64f (diff)
Rework the config file reader to be much more flexible and move many configuration directives to the actual modules they are used in.
Diffstat (limited to 'modules/commands/os_chankill.cpp')
-rw-r--r--modules/commands/os_chankill.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/modules/commands/os_chankill.cpp b/modules/commands/os_chankill.cpp
index 8253742a6..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;