summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2014-02-05 07:34:22 -0500
committerAdam <Adam@anope.org>2014-02-05 08:46:51 -0500
commitbb0e2a9a07e0931532d5f77486e2b11de2fa2997 (patch)
treea1580942a39b213be3b3166c5a1e0886d282fea9
parent4f8c4f8fefd55f36d4c626e00bf09555928ecaa4 (diff)
Make it easier to use fantasy without botserv, and document it
-rw-r--r--data/botserv.example.conf14
-rw-r--r--modules/fantasy.cpp2
-rw-r--r--modules/pseudoclients/botserv.cpp10
3 files changed, 15 insertions, 11 deletions
diff --git a/data/botserv.example.conf b/data/botserv.example.conf
index 59e326ce1..c341eceb3 100644
--- a/data/botserv.example.conf
+++ b/data/botserv.example.conf
@@ -3,7 +3,17 @@
*/
/*
- * First, create the service.
+ * First, create the service. If you do not want to have a 'BotServ', but do want the ability to have
+ * ChanServ assigned to channels for the use of fantasy commands, you may delete the below 'service' block.
+ *
+ * Note that deleting a 'service' block for a pseudoclient that is already online will not remove the
+ * client, the client becomes no different from a normal service bot, so you will have to use botserv/bot
+ * to manually delete the client.
+ *
+ * You may then waant to map some of the below commands to other services, like placing botserv/bot on
+ * OperServ so you can delete the below client, and mapping assign and unassign to ChanServ so users are
+ * able to control whether or not ChanServ is in the channel. You may also want to map botserv/set/nobot
+ * to OperServ so you can restrict who can assign the other core service clients.
*/
service
{
@@ -62,6 +72,8 @@ module
/*
* The name of the client that should be BotServ.
+ *
+ * This directive is optional.
*/
client = "BotServ"
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<Anope::string> 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<const Anope::string>("client");
-
- if (bsnick.empty())
- throw ConfigException(Module::name + ": <client> 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