summaryrefslogtreecommitdiff
path: root/modules/commands/os_dns.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2013-01-03 13:39:50 -0500
committerAdam <Adam@anope.org>2013-01-03 13:39:50 -0500
commit6ccf0a34289a21b97edbbef3578d5614bad45356 (patch)
treeab1ac948544557ada3a3c99a2cb397aeb2e4b735 /modules/commands/os_dns.cpp
parent23e303aaa2ffa3d66990e688b76380f403171f1e (diff)
Fixed os_dns not readding connected servers if configured
Diffstat (limited to 'modules/commands/os_dns.cpp')
-rw-r--r--modules/commands/os_dns.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/modules/commands/os_dns.cpp b/modules/commands/os_dns.cpp
index c60dd2641..cf5fa6000 100644
--- a/modules/commands/os_dns.cpp
+++ b/modules/commands/os_dns.cpp
@@ -116,13 +116,20 @@ class DNSServer : public Serializable
void SetLimit(unsigned l) { limit = l; }
bool Pooled() const { return pooled; }
- void Pool(bool p) { pooled = p; }
+ void Pool(bool p)
+ {
+ if (!p)
+ this->SetActive(p);
+ pooled = p;
+ }
bool Active() const { return pooled && active; }
void SetActive(bool p)
{
- this->Pool(p);
+ if (p)
+ this->Pool(p);
active = p;
+
if (dnsmanager)
dnsmanager->UpdateSerial();
}
@@ -485,7 +492,7 @@ class CommandOSDNS : public Command
if (s->GetIPs().empty())
{
s->repool = 0;
- s->SetActive(false);
+ s->Pool(false);
}
if (s->Active() && dnsmanager)
@@ -574,7 +581,7 @@ class CommandOSDNS : public Command
return;
}
- s->SetActive(false);
+ s->Pool(false);
source.Reply(_("Depooled %s."), s->GetName().c_str());
Log(LOG_ADMIN, source, this) << "to depool " << s->GetName();