summaryrefslogtreecommitdiff
path: root/modules/commands/os_dns.cpp
diff options
context:
space:
mode:
authorRobby- <robby@chat.be>2013-10-02 00:13:40 +0200
committerAdam <Adam@anope.org>2013-10-05 00:33:03 -0400
commit82006b868f0fc33cfe8903cdcf854a7f6be9b344 (patch)
treed6c2a3dee62c8ea49ec147babbff616ecbde9b84 /modules/commands/os_dns.cpp
parentba5a3f5f00609a5d82abd9e255dc93ee44d0e8f4 (diff)
cs_entrymsg: Check for the correct override privilege.
Make some more commands check if Read-Only mode is active. cs_flags: Show a meaningful message when a user is not found on the access list. os_set: Add missing capabilities to the readonly help output. OperServ: Add logging to certain commands. NickServ: Undo logging for listings.
Diffstat (limited to 'modules/commands/os_dns.cpp')
-rw-r--r--modules/commands/os_dns.cpp36
1 files changed, 36 insertions, 0 deletions
diff --git a/modules/commands/os_dns.cpp b/modules/commands/os_dns.cpp
index 9cb51bca2..1a6a6df7f 100644
--- a/modules/commands/os_dns.cpp
+++ b/modules/commands/os_dns.cpp
@@ -289,6 +289,9 @@ class CommandOSDNS : public Command
return;
}
+ if (Anope::ReadOnly)
+ source.Reply(READ_ONLY_MODE);
+
Log(LOG_ADMIN, source, this) << "to add zone " << zone;
new DNSZone(zone);
@@ -306,6 +309,9 @@ class CommandOSDNS : public Command
return;
}
+ if (Anope::ReadOnly)
+ source.Reply(READ_ONLY_MODE);
+
Log(LOG_ADMIN, source, this) << "to delete zone " << z->name;
for (std::set<Anope::string, ci::less>::iterator it = z->servers.begin(), it_end = z->servers.end(); it != it_end; ++it)
@@ -344,6 +350,9 @@ class CommandOSDNS : public Command
return;
}
+ if (Anope::ReadOnly)
+ source.Reply(READ_ONLY_MODE);
+
z->servers.insert(s->GetName());
s->zones.insert(zone);
@@ -365,6 +374,9 @@ class CommandOSDNS : public Command
s = new DNSServer(params[1]);
if (zone.empty())
{
+ if (Anope::ReadOnly)
+ source.Reply(READ_ONLY_MODE);
+
Log(LOG_ADMIN, source, this) << "to add server " << s->GetName();
source.Reply(_("Added server %s."), s->GetName().c_str());
}
@@ -378,6 +390,9 @@ class CommandOSDNS : public Command
return;
}
+ if (Anope::ReadOnly)
+ source.Reply(READ_ONLY_MODE);
+
Log(LOG_ADMIN, source, this) << "to add server " << s->GetName() << " to zone " << zone;
z->servers.insert(s->GetName());
@@ -409,6 +424,9 @@ class CommandOSDNS : public Command
return;
}
+ if (Anope::ReadOnly)
+ source.Reply(READ_ONLY_MODE);
+
Log(LOG_ADMIN, source, this) << "to remove server " << s->GetName() << " from zone " << z->name;
z->servers.erase(s->GetName());
@@ -428,6 +446,9 @@ class CommandOSDNS : public Command
z->servers.erase(s->GetName());
}
+ if (Anope::ReadOnly)
+ source.Reply(READ_ONLY_MODE);
+
Log(LOG_ADMIN, source, this) << "to delete server " << s->GetName();
source.Reply(_("Removed server %s."), s->GetName().c_str());
delete s;
@@ -457,6 +478,9 @@ class CommandOSDNS : public Command
return;
}
+ if (Anope::ReadOnly)
+ source.Reply(READ_ONLY_MODE);
+
s->GetIPs().push_back(params[2]);
source.Reply(_("Added IP %s to %s."), params[2].c_str(), s->GetName().c_str());
Log(LOG_ADMIN, source, this) << "to add IP " << params[2] << " to " << s->GetName();
@@ -479,6 +503,9 @@ class CommandOSDNS : public Command
return;
}
+ if (Anope::ReadOnly)
+ source.Reply(READ_ONLY_MODE);
+
for (unsigned i = 0; i < s->GetIPs().size(); ++i)
if (params[2].equals_ci(s->GetIPs()[i]))
{
@@ -515,6 +542,9 @@ class CommandOSDNS : public Command
return;
}
+ if (Anope::ReadOnly)
+ source.Reply(READ_ONLY_MODE);
+
if (params[2].equals_ci("LIMIT"))
{
try
@@ -560,6 +590,9 @@ class CommandOSDNS : public Command
return;
}
+ if (Anope::ReadOnly)
+ source.Reply(READ_ONLY_MODE);
+
s->SetActive(true);
source.Reply(_("Pooled %s."), s->GetName().c_str());
@@ -582,6 +615,9 @@ class CommandOSDNS : public Command
return;
}
+ if (Anope::ReadOnly)
+ source.Reply(READ_ONLY_MODE);
+
s->Pool(false);
source.Reply(_("Depooled %s."), s->GetName().c_str());