mirror of
https://github.com/anope/anope.git
synced 2026-06-27 05:26:38 +02:00
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
This commit is contained in:
@@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user