summaryrefslogtreecommitdiff
path: root/src/config.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2014-04-25 16:51:06 -0400
committerAdam <Adam@anope.org>2014-04-25 16:51:06 -0400
commit6a03eb69ebbe773f1d4139ff88d74ecdb2b0af4b (patch)
treed370fbc4a1dd55b72dbcda9f2aff24678d5626f3 /src/config.cpp
parent4fa2a00bd595eb120e6acde5eb167759c2018e33 (diff)
Add "virtual mode" support
This allows fully tracking extbans and other modes set by a different underlying mode, such as InspIRCd's namedmodes Add two configuration options to cs_ban to configure which mode is set and whether or not to kick banned users. Add default "mute" fantasy command to botserv.example.conf
Diffstat (limited to 'src/config.cpp')
-rw-r--r--src/config.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/config.cpp b/src/config.cpp
index e402080db..110045786 100644
--- a/src/config.cpp
+++ b/src/config.cpp
@@ -620,6 +620,21 @@ BotInfo *Conf::GetClient(const Anope::string &cname)
return GetClient(cname);
}
+Block *Conf::GetCommand(CommandSource &source)
+{
+ const Anope::string &block_name = source.c ? "fantasy" : "command";
+
+ for (std::pair<block_map::iterator, block_map::iterator> iters = blocks.equal_range(block_name); iters.first != iters.second; ++iters.first)
+ {
+ Block *b = &iters.first->second;
+
+ if (b->Get<Anope::string>("name") == source.command)
+ return b;
+ }
+
+ return NULL;
+}
+
File::File(const Anope::string &n, bool e) : name(n), executable(e), fp(NULL)
{
}