summaryrefslogtreecommitdiff
path: root/modules/commands/os_dns.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2013-09-16 06:28:48 -0400
committerAdam <Adam@anope.org>2013-09-16 06:47:42 -0400
commite3c05efe5e5085f3db14f1532a92de460b899ab5 (patch)
treea486474c1eff7e04a7167c1d069d23a93406e171 /modules/commands/os_dns.cpp
parent8cbaf7e9904e3cc6aca22566c83ea25959357d48 (diff)
Remove static variables from functions in modules which causes them to be marked as gnu unique objects, which breaks dlclose()/dlopen() on g++ 4.5+
Diffstat (limited to 'modules/commands/os_dns.cpp')
-rw-r--r--modules/commands/os_dns.cpp6
1 files changed, 4 insertions, 2 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;