405 lines
		
	
	
		
			14 KiB
		
	
	
	
		
			Django/Jinja
		
	
	
	
	
	
			
		
		
	
	
			405 lines
		
	
	
		
			14 KiB
		
	
	
	
		
			Django/Jinja
		
	
	
	
	
	
/*
 | 
						|
 * Example configuration file for BotServ.
 | 
						|
 */
 | 
						|
 | 
						|
/*
 | 
						|
 * 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 want 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
 | 
						|
{
 | 
						|
	/*
 | 
						|
	 * The name of the BotServ client.
 | 
						|
	 * If you change this value, you probably want to change the client directive in the configuration for the botserv module too.
 | 
						|
	 */
 | 
						|
	nick = "BotServ"
 | 
						|
 | 
						|
	/*
 | 
						|
	 * The username of the BotServ client.
 | 
						|
	 */
 | 
						|
	user = "services"
 | 
						|
 | 
						|
	/*
 | 
						|
	 * The hostname of the BotServ client.
 | 
						|
	 */
 | 
						|
	host = "ircservices.{{ external_domain }}"
 | 
						|
 | 
						|
	/*
 | 
						|
	 * The realname of the BotServ client.
 | 
						|
	 */
 | 
						|
	gecos = "Bot Service"
 | 
						|
 | 
						|
	/*
 | 
						|
	 * The modes this client should use.
 | 
						|
	 * Do not modify this unless you know what you are doing.
 | 
						|
	 *
 | 
						|
	 * These modes are very IRCd specific. If left commented, sane defaults
 | 
						|
	 * are used based on what protocol module you have loaded.
 | 
						|
	 *
 | 
						|
	 * Note that setting this option incorrectly could potentially BREAK some, if
 | 
						|
	 * not all, usefulness of the client. We will not support you if this client is
 | 
						|
	 * unable to do certain things if this option is enabled.
 | 
						|
	 */
 | 
						|
	#modes = "+o"
 | 
						|
 | 
						|
	/*
 | 
						|
	 * An optional comma separated list of channels this service should join. Outside
 | 
						|
	 * of log channels this is not very useful, as the service will just idle in the
 | 
						|
	 * specified channels, and will not accept any types of commands.
 | 
						|
	 *
 | 
						|
	 * Prefixes may be given to the channels in the form of mode characters or prefix symbols.
 | 
						|
	 */
 | 
						|
	#channels = "@#services,#mychan"
 | 
						|
}
 | 
						|
 | 
						|
/*
 | 
						|
 * Core BotServ module.
 | 
						|
 *
 | 
						|
 * Provides essential functionality for BotServ.
 | 
						|
 */
 | 
						|
module
 | 
						|
{
 | 
						|
	name = "botserv"
 | 
						|
 | 
						|
	/*
 | 
						|
	 * The name of the client that should be BotServ.
 | 
						|
	 *
 | 
						|
	 * This directive is optional.
 | 
						|
	 */
 | 
						|
	client = "BotServ"
 | 
						|
 | 
						|
	/*
 | 
						|
	 * The default bot options for newly registered channels. Note that changing these options
 | 
						|
	 * will have no effect on channels which are already registered. The list must be separated
 | 
						|
	 * by spaces.
 | 
						|
	 *
 | 
						|
	 * The options are:
 | 
						|
	 * -    dontkickops: Channel operators will be protected against BotServ kicks
 | 
						|
	 * - dontkickvoices: Voiced users will be protected against BotServ kicks
 | 
						|
	 * -          greet: The channel's BotServ bot will greet incoming users that have set a greet
 | 
						|
	 *                     in their NickServ settings
 | 
						|
	 * -        fantasy: Enables the use of BotServ fantasy commands in the channel
 | 
						|
	 *
 | 
						|
	 * This directive is optional, if left blank, there will be no defaults.
 | 
						|
	 */
 | 
						|
	defaults = "greet fantasy"
 | 
						|
 | 
						|
	/*
 | 
						|
	 * The minimum number of users there must be in a channel before the bot joins it. The best
 | 
						|
	 * value for this setting is 1 or 2. This can be 0, the service bots will not part unless
 | 
						|
	 * specifically unassigned, and will keep the channel open.
 | 
						|
	 */
 | 
						|
	minusers = 1
 | 
						|
 | 
						|
	/*
 | 
						|
	 * The bots are currently not affected by any modes or bans when they try to join a channel.
 | 
						|
	 * But some people may want to make it act like a real bot, that is, for example, remove all
 | 
						|
	 * the bans affecting the bot before joining the channel, remove a ban that affects the bot
 | 
						|
	 * set by a user when it is in the channel, and so on. Since it consumes a bit more CPU
 | 
						|
	 * time, you should not enable this on larger networks.
 | 
						|
	 *
 | 
						|
	 * This directive is optional.
 | 
						|
	 */
 | 
						|
	#smartjoin = yes
 | 
						|
 | 
						|
	/*
 | 
						|
	 * Modes to set on service bots when they join channels, comment this out for no modes
 | 
						|
	 *
 | 
						|
	 * This directive is optional.
 | 
						|
	 */
 | 
						|
	botmodes = "ao"
 | 
						|
 | 
						|
	/*
 | 
						|
	 * User modes to set on service bots. Read the comment about the service:modes directive
 | 
						|
	 * on why this can be a bad idea to set.
 | 
						|
	 */
 | 
						|
	#botumodes = "i"
 | 
						|
}
 | 
						|
 | 
						|
/*
 | 
						|
 * Core BotServ commands.
 | 
						|
 *
 | 
						|
 * In Anope modules can provide (multiple) commands, each of which has a unique command name. Once these modules
 | 
						|
 * are loaded you can then configure the commands to be added to any client you like with any name you like.
 | 
						|
 *
 | 
						|
 * Additionally, you may provide a permission name that must be in the opertype of users executing the command.
 | 
						|
 *
 | 
						|
 * Sane defaults are provided below that do not need to be edited unless you wish to change the default behavior.
 | 
						|
 */
 | 
						|
 | 
						|
/* Give it a help command. */
 | 
						|
command { service = "BotServ"; name = "HELP"; command = "generic/help"; }
 | 
						|
 | 
						|
/*
 | 
						|
 * bs_assign
 | 
						|
 *
 | 
						|
 * Provides the commands:
 | 
						|
 *   botserv/assign - Used to assign BotServ bots to channels
 | 
						|
 *   botserv/unassign - Used to unassign BotServ bots
 | 
						|
 *   botserv/set/nobot - Used to prohibit channels from being assigned BotServ bots.
 | 
						|
 *
 | 
						|
 * Used for assigning and unassigning bots to channels.
 | 
						|
 */
 | 
						|
module { name = "bs_assign" }
 | 
						|
command { service = "BotServ"; name = "ASSIGN"; command = "botserv/assign"; }
 | 
						|
command { service = "BotServ"; name = "UNASSIGN"; command = "botserv/unassign"; }
 | 
						|
command { service = "BotServ"; name = "SET NOBOT"; command = "botserv/set/nobot"; permission = "botserv/set/nobot"; }
 | 
						|
 | 
						|
/*
 | 
						|
 * bs_autoassign
 | 
						|
 *
 | 
						|
 * Allows service bots to be automatically assigned to channels upon registration.
 | 
						|
 */
 | 
						|
#module
 | 
						|
{
 | 
						|
	name = "bs_autoassign"
 | 
						|
 | 
						|
	/*
 | 
						|
	 * Automatically assign ChanServ to channels upon registration.
 | 
						|
	 */
 | 
						|
	bot = "ChanServ"
 | 
						|
}
 | 
						|
 | 
						|
/*
 | 
						|
 * bs_badwords
 | 
						|
 *
 | 
						|
 * Provides the command botserv/badwords.
 | 
						|
 *
 | 
						|
 * Used for controlling the channel badword list.
 | 
						|
 */
 | 
						|
module
 | 
						|
{
 | 
						|
	name = "bs_badwords"
 | 
						|
 | 
						|
	/*
 | 
						|
	 * The maximum number of entries a single bad words list can have.
 | 
						|
	 */
 | 
						|
	badwordsmax = 32
 | 
						|
 | 
						|
	/*
 | 
						|
	 * If set, BotServ will use case sensitive checking for badwords.
 | 
						|
	 *
 | 
						|
	 * This directive is optional.
 | 
						|
	 */
 | 
						|
	#casesensitive = yes
 | 
						|
}
 | 
						|
command { service = "BotServ"; name = "BADWORDS"; command = "botserv/badwords"; }
 | 
						|
 | 
						|
/*
 | 
						|
 * bs_bot
 | 
						|
 *
 | 
						|
 * Provides the command botserv/bot.
 | 
						|
 *
 | 
						|
 * Used for administrating BotServ bots.
 | 
						|
 */
 | 
						|
module { name = "bs_bot" }
 | 
						|
command { service = "BotServ"; name = "BOT"; command = "botserv/bot"; permission = "botserv/bot"; }
 | 
						|
 | 
						|
/*
 | 
						|
 * bs_botlist
 | 
						|
 *
 | 
						|
 * Provides the command botserv/botlist.
 | 
						|
 *
 | 
						|
 * Used for listing all available bots.
 | 
						|
 */
 | 
						|
module { name = "bs_botlist" }
 | 
						|
command { service = "BotServ"; name = "BOTLIST"; command = "botserv/botlist"; }
 | 
						|
 | 
						|
/*
 | 
						|
 * bs_control
 | 
						|
 *
 | 
						|
 * Provides the commands botserv/act and botserv/say.
 | 
						|
 *
 | 
						|
 * Used for making the bot message a channel.
 | 
						|
 */
 | 
						|
module { name = "bs_control" }
 | 
						|
command { service = "BotServ"; name = "ACT"; command = "botserv/act"; }
 | 
						|
command { service = "BotServ"; name = "SAY"; command = "botserv/say"; }
 | 
						|
 | 
						|
/*
 | 
						|
 * bs_info
 | 
						|
 *
 | 
						|
 * Provides the command botserv/info.
 | 
						|
 *
 | 
						|
 * Used for getting information on bots or channels.
 | 
						|
 */
 | 
						|
module { name = "bs_info" }
 | 
						|
command { service = "BotServ"; name = "INFO"; command = "botserv/info"; }
 | 
						|
 | 
						|
/*
 | 
						|
 * bs_kick
 | 
						|
 *
 | 
						|
 * Provides the commands:
 | 
						|
 *   botserv/kick - Dummy help wrapper for the KICK command.
 | 
						|
 *   botserv/kick/amsg - Configures BotServ's AMSG kicker.
 | 
						|
 *   botserv/kick/badwords - Configures BotServ's badwords kicker.
 | 
						|
 *   botserv/kick/bolds - Configures BotServ's bold text kiceker.
 | 
						|
 *   botserv/kick/caps - Configures BotServ's capital letters kicker.
 | 
						|
 *   botserv/kick/colors - Configures BotServ's color kicker.
 | 
						|
 *   botserv/kick/flood - Configures BotServ's flood kicker.
 | 
						|
 *   botserv/kick/italics - Configures BotServ's italics kicker.
 | 
						|
 *   botserv/kick/repeat - Configures BotServ's repeat kicker.
 | 
						|
 *   botserv/kick/reverses - Configures BotServ's reverse kicker.
 | 
						|
 *   botserv/kick/underlines - Configures BotServ's reverse kicker.
 | 
						|
 *   botserv/set/dontkickops - Used for preventing BotServ from kicking channel operators.
 | 
						|
 *   botserv/set/dontkickvoices - Used for preventing BotServ from kicking voices.
 | 
						|
 *
 | 
						|
 * Used for configuring what bots should kick for.
 | 
						|
 */
 | 
						|
module
 | 
						|
{
 | 
						|
	name = "bs_kick"
 | 
						|
 | 
						|
	/*
 | 
						|
	 * The amount of time that data for a user is valid in BotServ. If the data exceeds this time,
 | 
						|
	 * it is reset or deleted depending on the case. Do not set it too high, otherwise your
 | 
						|
	 * resources will be slightly affected.
 | 
						|
	 */
 | 
						|
	keepdata = 10m
 | 
						|
 | 
						|
	/*
 | 
						|
	 * If set, the bots will use a kick reason that does not state the word when it is kicking.
 | 
						|
	 * This is especially useful if you have young people on your network.
 | 
						|
	 *
 | 
						|
	 * This directive is optional.
 | 
						|
	 */
 | 
						|
	gentlebadwordreason = yes
 | 
						|
}
 | 
						|
command { service = "BotServ"; name = "KICK"; command = "botserv/kick"; }
 | 
						|
command { service = "BotServ"; name = "KICK AMSG"; command = "botserv/kick/amsg"; }
 | 
						|
command { service = "BotServ"; name = "KICK BADWORDS"; command = "botserv/kick/badwords"; }
 | 
						|
command { service = "BotServ"; name = "KICK BOLDS"; command = "botserv/kick/bolds"; }
 | 
						|
command { service = "BotServ"; name = "KICK CAPS"; command = "botserv/kick/caps"; }
 | 
						|
command { service = "BotServ"; name = "KICK COLORS"; command = "botserv/kick/colors"; }
 | 
						|
command { service = "BotServ"; name = "KICK FLOOD"; command = "botserv/kick/flood"; }
 | 
						|
command { service = "BotServ"; name = "KICK ITALICS"; command = "botserv/kick/italics"; }
 | 
						|
command { service = "BotServ"; name = "KICK REPEAT"; command = "botserv/kick/repeat"; }
 | 
						|
command { service = "BotServ"; name = "KICK REVERSES"; command = "botserv/kick/reverses"; }
 | 
						|
command { service = "BotServ"; name = "KICK UNDERLINES"; command = "botserv/kick/underlines"; }
 | 
						|
 | 
						|
command { service = "BotServ"; name = "SET DONTKICKOPS"; command = "botserv/set/dontkickops"; }
 | 
						|
command { service = "BotServ"; name = "SET DONTKICKVOICES"; command = "botserv/set/dontkickvoices"; }
 | 
						|
 | 
						|
 | 
						|
/*
 | 
						|
 * bs_set
 | 
						|
 *
 | 
						|
 * Provides the commands:
 | 
						|
 *   botserv/set/private - Used to prohibit specific BotServ bots from being assigned to channels.
 | 
						|
 */
 | 
						|
module { name = "bs_set" }
 | 
						|
command { service = "BotServ"; name = "SET"; command = "botserv/set"; }
 | 
						|
command { service = "BotServ"; name = "SET BANEXPIRE"; command = "botserv/set/banexpire"; }
 | 
						|
command { service = "BotServ"; name = "SET PRIVATE"; command = "botserv/set/private"; permission = "botserv/set/private"; }
 | 
						|
 | 
						|
/*
 | 
						|
 * greet
 | 
						|
 *
 | 
						|
 * Provides the commands:
 | 
						|
 *   botserv/set/greet - Used for enabling or disabling BotServ's greet messages in a channel.
 | 
						|
 *   nickserv/set/greet, nickserv/saset/greet - Used for changing a users greet message, which is displayed when they enter channels.
 | 
						|
 */
 | 
						|
module { name = "greet" }
 | 
						|
command { service = "BotServ"; name = "SET GREET"; command = "botserv/set/greet"; }
 | 
						|
command { service = "NickServ"; name = "SET GREET"; command = "nickserv/set/greet"; }
 | 
						|
command { service = "NickServ"; name = "SASET GREET"; command = "nickserv/saset/greet"; permission = "nickserv/saset/greet"; }
 | 
						|
 | 
						|
/*
 | 
						|
 * GREET privilege.
 | 
						|
 *
 | 
						|
 * Used by 'greet'.
 | 
						|
 *
 | 
						|
 * Users with this privilege have their greet shown when they join channels.
 | 
						|
 */
 | 
						|
privilege
 | 
						|
{
 | 
						|
	name = "GREET"
 | 
						|
	rank = 40
 | 
						|
	level = 5
 | 
						|
	flag = "g"
 | 
						|
	xop = "AOP"
 | 
						|
}
 | 
						|
 | 
						|
 | 
						|
/*
 | 
						|
 * fantasy
 | 
						|
 *
 | 
						|
 * Allows 'fantaisist' commands to be used in channels.
 | 
						|
 *
 | 
						|
 * Provides the commands:
 | 
						|
 *   botserv/set/fantasy - Used for enabling or disabling BotServ's fantasist commands.
 | 
						|
 */
 | 
						|
module
 | 
						|
{
 | 
						|
	name = "fantasy"
 | 
						|
 | 
						|
	/*
 | 
						|
	 * Defines the prefixes for fantasy commands in channels. One of these characters will have to be prepended
 | 
						|
	 * to all fantasy commands. If you choose "!", for example, fantasy commands will be "!kick",
 | 
						|
	 * "!op", etc. This directive is optional, if left out, the default fantasy character is "!".
 | 
						|
	 */
 | 
						|
	#fantasycharacter = "!."
 | 
						|
}
 | 
						|
command { service = "BotServ"; name = "SET FANTASY"; command = "botserv/set/fantasy"; }
 | 
						|
 | 
						|
/*
 | 
						|
 * Fantasy commands
 | 
						|
 *
 | 
						|
 * Fantasy commands can be executed in channels that have a BotServ bot by prefixing the
 | 
						|
 * command with one of the fantasy characters configured in botserv's fantasycharacter
 | 
						|
 * directive.
 | 
						|
 *
 | 
						|
 * Sane defaults are provided below that do not need to be edited unless you wish to change the default behavior.
 | 
						|
 */
 | 
						|
fantasy { name = "ACCESS"; command = "chanserv/access"; }
 | 
						|
fantasy { name = "AKICK"; command = "chanserv/akick"; }
 | 
						|
fantasy { name = "AOP"; command = "chanserv/xop"; }
 | 
						|
fantasy { name = "BAN"; command = "chanserv/ban"; }
 | 
						|
fantasy { name = "CLONE"; command = "chanserv/clone"; }
 | 
						|
fantasy { name = "DEHALFOP"; command = "chanserv/modes"; }
 | 
						|
fantasy { name = "DEOP"; command = "chanserv/modes"; }
 | 
						|
fantasy { name = "DEOWNER"; command = "chanserv/modes"; }
 | 
						|
fantasy { name = "DEPROTECT"; command = "chanserv/modes"; }
 | 
						|
fantasy { name = "DEVOICE"; command = "chanserv/modes"; }
 | 
						|
fantasy { name = "DOWN"; command = "chanserv/down"; }
 | 
						|
fantasy { name = "ENFORCE"; command = "chanserv/enforce"; }
 | 
						|
fantasy { name = "ENTRYMSG"; command = "chanserv/entrymsg"; }
 | 
						|
fantasy { name = "FLAGS"; command = "chanserv/flags"; }
 | 
						|
fantasy { name = "HALFOP"; command = "chanserv/modes"; }
 | 
						|
fantasy { name = "HELP"; command = "generic/help"; prepend_channel = false; }
 | 
						|
fantasy { name = "HOP"; command = "chanserv/xop"; }
 | 
						|
fantasy { name = "INFO"; command = "chanserv/info"; prepend_channel = false; }
 | 
						|
fantasy { name = "INVITE"; command = "chanserv/invite"; }
 | 
						|
fantasy { name = "K"; command = "chanserv/kick"; }
 | 
						|
fantasy { name = "KB"; command = "chanserv/ban"; }
 | 
						|
fantasy { name = "KICK"; command = "chanserv/kick"; }
 | 
						|
fantasy { name = "LEVELS"; command = "chanserv/levels"; }
 | 
						|
fantasy { name = "LIST"; command = "chanserv/list"; prepend_channel = false; }
 | 
						|
fantasy { name = "LOG"; command = "chanserv/log"; }
 | 
						|
fantasy { name = "MODE"; command = "chanserv/mode"; }
 | 
						|
fantasy { name = "MUTE"; command = "chanserv/ban"; kick = no; mode = "QUIET"; }
 | 
						|
fantasy { name = "OP"; command = "chanserv/modes"; }
 | 
						|
fantasy { name = "OWNER"; command = "chanserv/modes"; }
 | 
						|
fantasy { name = "PROTECT"; command = "chanserv/modes"; }
 | 
						|
fantasy { name = "QOP"; command = "chanserv/xop"; }
 | 
						|
fantasy { name = "SEEN"; command = "chanserv/seen"; prepend_channel = false; }
 | 
						|
fantasy { name = "SOP"; command = "chanserv/xop"; }
 | 
						|
fantasy { name = "STATUS"; command = "chanserv/status"; }
 | 
						|
fantasy { name = "SUSPEND"; command = "chanserv/suspend"; permission = "chanserv/suspend"; }
 | 
						|
fantasy { name = "SYNC"; command = "chanserv/sync"; }
 | 
						|
fantasy { name = "TOPIC"; command = "chanserv/topic"; }
 | 
						|
fantasy { name = "UNBAN"; command = "chanserv/unban"; }
 | 
						|
fantasy { name = "UNSUSPEND"; command = "chanserv/unsuspend"; permission = "chanserv/suspend"; }
 | 
						|
fantasy { name = "UP"; command = "chanserv/up"; }
 | 
						|
fantasy { name = "VOICE"; command = "chanserv/modes"; }
 | 
						|
fantasy { name = "VOP"; command = "chanserv/xop"; }
 |