summaryrefslogtreecommitdiff
path: root/modules/commands
diff options
context:
space:
mode:
Diffstat (limited to 'modules/commands')
-rw-r--r--modules/commands/os_dns.cpp6
-rw-r--r--modules/commands/os_news.cpp3
2 files changed, 6 insertions, 3 deletions
diff --git a/modules/commands/os_dns.cpp b/modules/commands/os_dns.cpp
index 717cbf29b..ee651f702 100644
--- a/modules/commands/os_dns.cpp
+++ b/modules/commands/os_dns.cpp
@@ -663,9 +663,12 @@ class ModuleDNS : public Module
bool remove_split_servers;
bool readd_connected_servers;
+ time_t last_warn;
+
public:
ModuleDNS(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, EXTRA | VENDOR),
- zone_type("DNSZone", DNSZone::Unserialize), dns_type("DNSServer", DNSServer::Unserialize), commandosdns(this)
+ zone_type("DNSZone", DNSZone::Unserialize), dns_type("DNSServer", DNSServer::Unserialize), commandosdns(this),
+ last_warn(0)
{
@@ -840,7 +843,6 @@ class ModuleDNS : public Module
if (packet->answers.size() == answer_size)
{
- static time_t last_warn = 0;
if (last_warn + 60 < Anope::CurTime)
{
last_warn = Anope::CurTime;
diff --git a/modules/commands/os_news.cpp b/modules/commands/os_news.cpp
index bdff3c5eb..487a45300 100644
--- a/modules/commands/os_news.cpp
+++ b/modules/commands/os_news.cpp
@@ -325,6 +325,8 @@ class CommandOSRandomNews : public NewsBase
}
};
+static unsigned cur_rand_news = 0;
+
class OSNews : public Module
{
Serialize::Type newsitem_type;
@@ -356,7 +358,6 @@ class OSNews : public Module
else if (Type == NEWS_RANDOM)
msg = _("[\002Random News\002 - %s] %s");
- static unsigned cur_rand_news = 0;
unsigned displayed = 0, news_count = Config->GetModule(this)->Get<unsigned>("newscount", "3");
for (unsigned i = 0, end = newsList.size(); i < end; ++i)
{