config module¶
The default configuration for tormodbot.
After running tormodbot for the first time, these options will be saved in
weechat’s configuration system and to its plugins.conf file. At this point,
editing this file will do nothing to change settings that exist in
plugins.conf. If you want to change your configuration, you should use
weechat’s /set
command. For example:
/set plugins.var.python.tormodbot.serv "freenode"
If you want to add a configuration option, It’s value must be a string. Boolean values are interpreted as per https://weechat.org/files/doc/stable/weechat_plugin_api.en.html#_config_string_to_boolean, i.e.:
1 if text is "true" ("on", "yes", "y", "true", "t", "1")
0 if text is "false" ("off", "no", "n", "false", "f", "0")
- config.ANTIFLOOD_ACTIONS = 'quiet_host'¶
Comma-separated list of actions to take when a nick is detected as flooding.
Assume for example the flooding user is pastly!~pastly@example.com. Possible actions are:
‘quiet_host’: tell chanserv to +q *!*@example.com
If you, the developer, want to add new actions, then add them to the Action enum in
tmb_mod.antiflood
.
- config.ANTIFLOOD_ENABLED = 'off'¶
Whether to enable the
tmb_mod.antiflood
module
- config.ANTIFLOOD_MSG_LIMIT = '10'¶
The maximum number of messages any one nick can send in a channel over the course of
ANTIFLOOD_MSG_LIMIT_SECONDS
- config.ANTIFLOOD_MSG_LIMIT_SECONDS = '30'¶
If a nick sends
ANTIFLOOD_MSG_LIMIT
messages in this amount of time, it is considered to be flooding
- config.AUTOVOICE_ENABLED = 'off'¶
Whether to enable the
tmb_mod.autovoice
module
- config.AUTOVOICE_REGEX_ALWAYS = '.*!.*@pastly.netop.oftc.net'¶
Comma-separated list of regex strings that, if one matches the
n!u@h
, results in +v on the user
- config.AUTOVOICE_REGEX_REGISTERED = '.*'¶
Comma-separated list of regex strings that, if one matches the
n!u@h
and the nick registered with nickserv at leastAUTOVOICE_REGISTERED_SECONDS
ago, result in +v on the user
- config.AUTOVOICE_REGISTERED_SECONDS = '86400'¶
How long ago the nick in question must have been registered with nickserv in order for a positive regex match to result in the nick getting +v
- config.BADWORDS_ACTIONS = 'quiet_nick'¶
Comma-separated list of actions to take when a nick is detected as having said a bad word.
Assume for example user is pastly!~pastly@example.com. Possible actions are:
‘quiet_nick’: tell chanserv to +q pastly!*@*
If you, the developer, want to add new actions, then add them to the Action enum in
tmb_mod.badwords
.
- config.BADWORDS_BADWORDS = ''¶
Comma-separated list of bad words
- config.BADWORDS_ENABLED = 'on'¶
Whether to enable the
tmb_mod.badwords
module
- config.BOTABUSE_BOTS = ''¶
Nicks belonging to bots that might spam and that we want to temporarily mute if they do
- config.BOTABUSE_ENABLED = 'on'¶
Whether to enable the
tmb_mod.botabuse
module
- config.CHANSERV_USERSTR = 'ChanServ!services@services.oftc.net'¶
The full nick!user@host string for chanserv
- config.CMD_CHAN = '#pastly-log'¶
Channel from which to take commands. If empty, only takes commands from PM. We always take commands from PM.
- config.CODE_URL = 'https://gitlab.torproject.org/pastly/weechat-tormodbot'¶
Where the source code for this bot is hosted
- config.FAQ_BURST = '3'¶
How many FAQ responses we can burst to a specific channel without waiting
- config.FAQ_ENABLED = 'on'¶
Whether to enable the
tmb_mod.faq
module
- config.FAQ_RATE = '5000'¶
How long, in milliseconds, we must wait between FAQ responses in a specific channel
- config.FAQ_RECENT = '120'¶
How long, in seconds, we must wait between given the same FAQ response in the same channel.
- config.HELLO_ENABLED = 'off'¶
Whether to enable the
tmb_mod.hello
module
- config.HELLO_HELLO_WORDS = 'hi,hello,test,help,noob,guys,anyone'¶
Comma-separated list of strings that, if found in a message, indicate the message is a “hello?” message
- config.HELLO_INTERVAL = '180'¶
The amount of time, in seconds, that must pass before we will send our autoreponse in a a specific channel again
- config.HELLO_MANUAL_ENABLED = 'on'¶
If enabled, anyone in a moderated chan with a configured automated response can say ‘!hello’ and get the response for that channel printed
- config.HELLO_MSG_MAX_LEN = '20'¶
If a message is longer than this, assume it is not a “hello?” message
- config.HELLO_NEW_JOINS = '100'¶
After this many joins in a channel, a user can send a “hello?” message without us sending an automated response
- config.HELLO_NEW_MSGS = '2'¶
After this many messages in a channel, a user can send a “hello?” message without us sending an automated response
- config.IGNORES = 'weasel'¶
No matter what the context, if we see a PRIVMSG or a NOTICE from these nicks, we do nothing in response.
- config.JOINSPAM_ENABLED = 'on'¶
Whether to enable the
tmb_mod.joinspam
module
- config.JOINSPAM_MAX_JOINS = '6'¶
Joining the same channel this many times in RECENT_MINS time means you’re spamming.
- config.JOINSPAM_RECENT_MINS = '30'¶
Time period to consider when counting joins.
- config.LOG_CHAN = '#pastly-log'¶
Channel/user in which to log messages in addition to the core window
- config.MASTERS = 'pastly'¶
Nicks from which we will accept commands (as private messages or in the command channel)
- config.MOD_CHANS = '#pastly-test,#pastly-test2'¶
Channels that we moderate
- config.MSG_BURST = '5'¶
How many messages we can burst to the server. This must always be at least 1. Setting this to 1 means you can’t burst at all.
- config.MSG_RATE = '505'¶
How many milliseconds must pass between our messages to the server in steady state. To be safe, set this slightly higher than whatever the IRCd actually requires.
- config.NICKSERV_USERSTR = 'NickServ!services@services.oftc.net'¶
The full nick!user@host string for nickserv
- config.SERV = 'oftc'¶
IRC server we’re joining and on which all the channels are