#
# Fantasy settings:
#
-#<fantasy prefix="!">
+#<fantasy prefix="!" allowbots="no">
#
# prefix:
# Set the prefix for in-channel aliases (fantasy commands) to the
# specified character. If not set, the default is "!".
+# allowbots:
+# If this is set to no, +B clients will not be able to use fantasy
+# commands. If not set, the default is no.
#
#-#-#-#-#-#-#-#-#-#-#- ALIAS DEFINITIONS -#-#-#-#-#-#-#-#-#-#-#-#-#-#
# #
*/
std::multimap<std::string, Alias> Aliases;
+ /* whether or not +B users are allowed to use fantasy commands */
+ bool AllowBots;
+
virtual void ReadAliases()
{
ConfigReader MyConf(ServerInstance);
+
+ AllowBots = MyConf.ReadFlag("fantasy", "allowbots", "no", 0);
std::string fpre = MyConf.ReadValue("fantasy","prefix",0);
fprefix = fpre.empty() ? '!' : fpre[0];
return 0;
}
+ /* Stop here if the user is +B and allowbot is set to no. */
+ if (!AllowBots && user->IsModeSet('B'))
+ {
+ ServerInstance->Logs->Log("FANTASY", DEBUG, "fantasy: user is +B and allowbot is set to no");
+ return 0;
+ }
+
Channel *c = (Channel *)dest;
std::string fcommand;