1
0
mirror of https://github.com/anope/anope.git synced 2026-06-12 19:14:47 +02:00

Make it easier to use fantasy without botserv, and document it

This commit is contained in:
Adam
2014-02-05 07:34:22 -05:00
parent 4f8c4f8fef
commit bb0e2a9a07
3 changed files with 15 additions and 11 deletions
+13 -1
View File
@@ -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"
+1 -1
View File
@@ -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;
+1 -9
View File
@@ -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