From bb0e2a9a07e0931532d5f77486e2b11de2fa2997 Mon Sep 17 00:00:00 2001 From: Adam Date: Wed, 5 Feb 2014 07:34:22 -0500 Subject: Make it easier to use fantasy without botserv, and document it --- modules/fantasy.cpp | 2 +- modules/pseudoclients/botserv.cpp | 10 +--------- 2 files changed, 2 insertions(+), 10 deletions(-) (limited to 'modules') diff --git a/modules/fantasy.cpp b/modules/fantasy.cpp index 0c4626083..6a212a633 100644 --- a/modules/fantasy.cpp +++ b/modules/fantasy.cpp @@ -97,7 +97,7 @@ class Fantasy : public Module if (!u || !c || !c->ci || !c->ci->bi || msg.empty() || msg[0] == '\1') return; - if (!fantasy.HasExt(c->ci)) + if (Config->GetClient("BotServ") && !fantasy.HasExt(c->ci)) return; std::vector params; diff --git a/modules/pseudoclients/botserv.cpp b/modules/pseudoclients/botserv.cpp index d6dd32e71..ddcbd76e6 100644 --- a/modules/pseudoclients/botserv.cpp +++ b/modules/pseudoclients/botserv.cpp @@ -25,15 +25,7 @@ class BotServCore : public Module void OnReload(Configuration::Conf *conf) anope_override { const Anope::string &bsnick = conf->GetModule(this)->Get("client"); - - if (bsnick.empty()) - throw ConfigException(Module::name + ": must be defined"); - - BotInfo *bi = BotInfo::Find(bsnick, true); - if (!bi) - throw ConfigException(Module::name + ": no bot named " + bsnick); - - BotServ = bi; + BotServ = BotInfo::Find(bsnick, true); } void OnSetCorrectModes(User *user, Channel *chan, AccessGroup &access, bool &give_modes, bool &take_modes) anope_override -- cgit