summaryrefslogtreecommitdiff
path: root/src/config.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2013-05-26 17:13:11 -0400
committerAdam <Adam@anope.org>2013-05-26 17:13:11 -0400
commit22658d63bdb1e52a66f4514af45fa55ca5891345 (patch)
tree673304ab19f7e077b489354248247867518331f8 /src/config.cpp
parentf2dee1e1d642b07947f59f91dfba9af34ef84685 (diff)
Get rid of the remaining references in the core to specific services. Move more stuff out of the core to the proper modules.
Diffstat (limited to 'src/config.cpp')
-rw-r--r--src/config.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/config.cpp b/src/config.cpp
index 52469c75a..d90c9728c 100644
--- a/src/config.cpp
+++ b/src/config.cpp
@@ -589,6 +589,18 @@ Block *Conf::GetModule(const Anope::string &mname)
return GetModule(mname);
}
+BotInfo *Conf::GetClient(const Anope::string &cname)
+{
+ Anope::map<Anope::string>::iterator it = bots.find(cname);
+ if (it != bots.end())
+ return BotInfo::Find(!it->second.empty() ? it->second : cname, true);
+
+ Block *block = GetModule(cname.lower());
+ const Anope::string &client = block->Get<const Anope::string>("client");
+ bots[cname] = client;
+ return GetClient(cname);
+}
+
File::File(const Anope::string &n, bool e) : name(n), executable(e), fp(NULL)
{
}