3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-12-17 23:52:49 +01:00
PyLink/example-conf.yml

510 lines
20 KiB
YAML

# This is a sample configuration file for PyLink. You'll likely want to rename it to pylink.yml
# and begin your configuration there.
# Note: lines starting with a "#" are comments and will be ignored.
# Note 2: Use SPACES, NOT tabs to indent, or you will get parser errors on start!
bot:
# Sets nick, user/ident, and real name.
nick: PyLink
ident: pylink
realname: PyLink Service Client
# Server description (shown in /links, /whois, etc.)
serverdesc: PyLink Server
# Options below this require the fantasy plugin to be loaded.
# Sets the default fantasy command prefix for calling commands inside channels
prefix: "&"
# Determines whether the bot will reply to commands prefixed with its nick
# (case sensitive and requires the fantasy plugin).
respondtonick: true
# Custom fantasy command prefixes for other service bots if they are loaded.
prefixes:
games: "@"
# Determines whether hideoper modes should be respected in WHOIS responses.
# Defaults to true if not specified.
whois_use_hideoper: true
# Determines whether extended WHOIS replies should be sent to users marked
# +B (bot). For better security, it is recommended to leave this off.
whois_show_extensions_to_bots: false
# Determines whether PyLink service clients should protect themselves from
# kicks, kills, etc. using IRCd-side servprotect modes. For this to work
# properly, this requires that PyLink be U-Lined (on most IRCds). Defaults to
# False.
protect_services: false
# Determines how long plugins should wait (in seconds) before flushing their
# databases to disk. Defaults to 300 seconds. Changes here require a reload
# of all database-enabled plugins to take effect.
save_delay: 300
login:
# PyLink administrative login - Change this, or the service will not start!
user: admin
password: changeme
servers:
# Please note: these are only EXAMPLE link blocks. You should edit them and
# remove ones that you don't need in your config.
# Short name for the network. This is used for relay's nick suffixes, the
# network plugin's (dis)connect commands, and elsewhere internally.
# You should change this to some abbreviation representing your network
# name; usually something 3-5 characters should be good.
inspnet:
# Server IP, port, and passwords. The ip: field also supports resolving
# hostnames.
ip: 127.0.0.1
port: 7000
recvpass: "abcd"
sendpass: "abcd"
# The full network name, used by plugins.
netname: "InspIRCd Network"
# Hostname we will use to connect to the remote server
hostname: "pylink.yournet.local"
# SID - required for InspIRCd and TS6 based servers. This must be three
# characters long.
# The first char must be a digit [0-9], and the remaining two chars may
# be either uppercase letters [A-Z] or digits.
sid: "0PY"
# SID range - the range of SIDs PyLink is allowed to use to generate
# server IDs. On TS6, this should be a combination of digits, letters,
# and #'s. Each # denotes a range (0-9A-Z) of characters that can be
# used by PyLink to generate appropriate SIDs. You will want to make
# sure no other servers are using this range.
# There must be at least one # in the entry.
sidrange: "8##"
# Autojoin channels. Comment this line out if you don't want service bots
# tojoin any channels by default.
channels: ["#pylink"]
# Sets the protocol module to use - see the protocols/ folder for a list
# of valid values (omitting the .py extension).
protocol: "inspircd"
# Sets autoconnect delay - comment this out or set the value below 1 to
# disable autoconnect entirely.
autoconnect: 5
# Sets ping frequency (i.e. how long we should wait between sending
# pings to our uplink). When more than two consecutive pings are missed,
# PyLink will disconnect with a ping timeout. This defaults to 90 if
# not set.
pingfreq: 90
# If enabled, this opts this network out of relay IP sharing. i.e. this network
# will not have its users' IPs sent across the relay, and it will not see any
# IPs of other networks' users.
#relay_no_ips: true
# Sets the max nick length for the network. It is important this is
# set correctly, or PyLink might introduce a nick that is too long and
# cause netsplits! This defaults to 30 if not set.
maxnicklen: 30
# Toggles SSL for this network. Defaults to False if not specified.
#ssl: true
# Optional SSL cert/key to pass to the uplink server.
#ssl_certfile: pylink-cert.pem
#ssl_keyfile: pylink-key.pem
# Optionally, you can set this option to verify the SSL certificate
# fingerprint of your uplink.
#ssl_fingerprint: "e0fee1adf795c84eec4735f039503eb18d9c35cc"
# This sets the hash type for the fingerprint (md5, sha1, sha256, etc.)
# Valid values include md5 and sha1-sha512, though others may be
# supported depending on your system: see
# https://docs.python.org/3/library/hashlib.html
# This setting defaults to sha256.
#ssl_fingerprint_type: sha256
ts6net:
ip: ::1
# Determines whether IPv6 should be used for this connection. Should the ip:
# above be a hostname instead of an IP, this will affect whether A records
# (IPv4) or AAAA records (IPv6) will be used in resolving it.
ipv6: yes
port: 7000
recvpass: "abcd"
sendpass: "abcd"
hostname: "pylink.example.com"
sid: "8PY"
netname: "some TS6 network"
sidrange: "8P#"
protocol: "ts6"
autoconnect: 5
# Note: /'s in nicks are automatically converted to |'s for TS6
# networks, since they don't allow "/" in nicks.
separator: "|"
# The following options are specific to TS6 servers:
# Toggles owner (+y), admin (+a), and halfop (+h) support for
# shadowircd/elemental-ircd.
# This defaults to off for the best compatibility.
use_owner: false
use_admin: false
use_halfop: false
# Toggles support of shadowircd/elemental-ircd specific channel modes:
# +T (no notice), +u (hidden ban list), +E (no kicks), +J (blocks
# kickrejoin),
# +K (no repeat messages), +d (no nick changes), and user modes:
# +B (bot), +C (blocks CTCP), +D (deaf), +V (no invites), +I (hides
# channel list)
use_elemental_modes: false
unrealnet:
ip: 1.2.3.4
port: 8067
# Received and sent passwords. For passwordless links using SSL fingerprints, simply set
# these two fields to "*" and enable SSL with a cert and key file.
recvpass: "coffee"
sendpass: "tea"
#ssl: true
#ssl_certfile: mycert.pem
#ssl_keyfile: mycert.pem
hostname: "pylink.example.com"
sid: "2PY"
netname: "This should match your UnrealIRCd config"
sidrange: "8##"
channels: []
protocol: "unreal"
autoconnect: 5
# You can also define network-specific nicks and idents for various service
# bots, using the configuration options "servicename_nick" and "servicename_ident".
#pylink_nick: MagicServ
#pylink_ident: magicserv
#games_nick: MagicGames
#games_ident: magicgames
nefarious:
ip: somenet.ddns.local
#ipv6: false
port: 45454
recvpass: "recv"
sendpass: "send"
hostname: "pylink.midnight.vpn"
# For P10, the SID and SID range options are just numbers. Make sure nothing
# else is using the range you're reserving for PyLink.
sid: 50
sidrange: "100-150"
channels: ["#lounge"]
protocol: nefarious
autoconnect: 5
netname: "Nefarious test server"
# The following options are specific to Nefarious servers.
# Halfop is optional in Nefarious. This should match your IRCd configuration.
use_halfop: false
# Determines whether account-based cloaks should be used (someone.users.yournet.org
# format). This should match your IRCd configuration:
# ENABLE this if HOST_HIDING_STYLE is set to either 1 or 3.
use_account_cloaks: true
# The cloak suffix to be used for account-based cloaks. This **MUST** match your
# IRCd configuration if use_account_cloaks is enabled.
cloak_suffix: "users.yournet.org"
# Determines whether account-based cloaks should be used for opers
# (someone.opers.yournet.org format). If use_account_cloaks is disabled,
# this will have no effect. This should match your IRCd configuration:
use_oper_account_cloaks: true
# The cloak suffix to be used for IRCop account-based cloaks. This **MUST** match your
# IRCd configuration if use_oper_account_cloaks is enabled.
oper_cloak_suffix: "staff.yournet.org"
# Determines whether UnrealIRCd-style hashed-host cloaks will be used.
# This should match your IRCd configuration:
# ENABLE this if HOST_HIDING_STYLE is set to either 2 or 3.
use_hashed_cloaks: true
# Determines whether extended accounts should be used for this network.
# This **MUST** match the EXTENDED_ACCOUNTS setting in your IRCd configuration.
# Disable this if you are using X3, and leave it on for any other service package
# (atheme, etc.)
use_extended_accounts: true
# Sample Clientbot configuration, if you want to connect PyLink as a bot to relay somewhere
# (or do other bot things).
magicnet:
ip: 1.2.3.4
port: 6697
# Server password (optional).
#sendpass: "wastedbytes103"
channels: ["#this-works-as-usual"]
protocol: "clientbot"
# You can set any clientbot-specific nicks and idents here if you wish. They default to
# the nick/ident specified in the bot: config block if not given.
pylink_nick: pybot
#pylink_ident: pybot
# SSL options. Certfile and keyfile are optional but can be used for CertFP login if
# supported.
ssl: true
#ssl_certfile: mycert.pem
#ssl_keyfile: mycert.pem
# Autoconnect works like usual.
autoconnect: 30
# Message throttling: when set to a non-zero value, only one message will be sent every X
# seconds. If your bot is constantly running into Excess Flood errors, raising this to
# something like 0.5 or 1.0 should help. Defaults to 0.01 if not set.
throttle_time: 0.3
# Clientbot also supports auto perform, using raw IRC messages.
#autoperform:
# - "NOTICE somebody :hello, i've connected"
# Determines whether oper statuses should be tracked on this Clientbot network. This
# defaults to False for the best security, since oper status may allow more access to the
# entire PyLink service than what's desired, even when PyLink is only connected as a bot.
track_oper_statuses: false
# Plugins to load (omit the .py extension)
plugins:
# Commands plugin: Provides core commands such as logging in, shutting down
# PyLink, and various command help.
- commands
# Networks plugin: Allows you to manage (dis)connections to networks while
# PyLink is running.
- networks
# Ctcp plugin: handles basic CTCP replies (VERSION, etc).
- ctcp
# Oper commands plugin: Provides a subset of network management commands.
# (KILL, JUPE, etc.)
# Note: these commands will be made available to anyone who's opered on your
# network, so make sure your opers are trustworthy!
#- opercmds
# Bots plugin: Allows you to manipulate pseudo-clients (bots) on networks.
#- bots
# Relay plugin: Janus-style server-side relay plugin. See the relay: block
# below for configuration.
#- relay
# Relay Clientbot extensions: this allows channel messages and events like
# JOIN, PART, KICK, etc. to relay over networks using Clientbot. You will
# want this loaded if you're using PyLink as a relay bot.
#- relay_clientbot
# Fantasy plugin: Allows you to trigger commands in channels by PyLink's
# nick or a configurable prefix character.
#- fantasy
# Changehost plugin: Automatically changes the hostmask of matching users
# to a template string, as they connect. This requires the changehost: block
# to be configured correctly below.
#- changehost
# Automode plugin: allows assigning channel access to specific hostmasks or
# exttargets. See https://github.com/GLolol/PyLink/blob/master/docs/automode.md
# for a usage guide.
#- automode
# Servermaps plugin: displays network /map's from the PyLink server's perspective.
#- servermaps
logging:
# This configuration block defines targets that PyLink should log commands,
# errors, etc., to.
# This sets the level for STDOUT logging, which is always enabled. Valid
# settings include DEBUG, INFO, WARNING, ERROR, and CRITICAL: see
# https://docs.python.org/3/library/logging.html#logging-levels for details.
stdout: INFO
channels:
# Log to channels on the specified networks.
# Make sure that the main PyLink client is configured to join your
# log channel in the channels: blocks for the networks it will be
# logging on. It will not automatically join log channels.
# Note: Log messages are forwarded over relay, so you will get duplicate
# messages if you add log blocks for more than one channel in one
# relay.
# Note 2: DEBUG logging is not supported here: any log level settings
# below INFO be automatically raised to INFO.
inspnet:
"#services":
loglevel: INFO
"#pylink-notifications":
loglevel: WARNING
ts6net:
"#services":
loglevel: INFO
files:
# Logs to file targets. These will be placed in the log/ folder in the
# PyLink directory, with a filename based on the current instance name
# and the target name defined: instancename-targetname.log
# Changing settings in this block will require a restart to take effect.
# When running with ./pylink, this will create log/pylink-errors.log
# When running with ./pylink someconf.yml, this will create log/someconf-errors.log
"errors":
loglevel: ERROR
# Ditto above. When running with ./pylink, it will use log/pylink-commands.log
# When running with ./pylink someconf.yml, this will create log/someconf-commands.log
"commands":
loglevel: INFO
# Uncomment this to enable debug logging. This is only needed if you're developing for
# PyLink or are requested to enable this when reporting a bug.
#"debug":
# loglevel: DEBUG
#filerotation:
# Configures optional log file rotation. When enabled, PyLink will create rotate files
# in the format pylink-commands.log, pylink-commands.log.1, pylink-commands.log.2, etc.
# If either max_bytes or backup_count is 0, log rotation will be disabled.
# Max amount of bytes per file, before rotation is done. Defaults to 50 MiB (52428800 bytes).
#max_bytes: 52428800
# Amount of backups to make. Defaults to 5.
#backup_count: 5
changehost:
# This block configures the Changehost plugin. You don't need this if you
# aren't using it.
# Sets the networks where Changehost should be enabled.
enabled_nets:
- inspnet
- ts6net
# This sets the hostmasks that Changehost should look for. Whenever someone
# with a matching nick!user@host connects, their host will be set to the
# text defined. The following substitutions are available here:
# $uid, $ts (time of connection), $nick, $realhost, $ident, and $ip.
# Invalid characters in hosts are replaced with a "-".
# Also, make sure you quote each entry so the YAML parser treats them as
# raw strings.
hosts:
# Here are some examples. Note that to keep your users' details
# private, you should probably refrain from using $ip or $realhost,
# in these hostmasks, unless cloaking is already disabled.
"*!GLolol@*.yournet.com": "$nick.opers.yournet.com"
"*!*@localhost": "some-server.hostname"
# Freenode-style masks are possible with this (though without the
# hashing)
"*!*@bnc-server.yournet.com": "yournet/bnc-users/$ident"
"*!*@ircip?.mibbit.com": "$ident.$realhost"
"WebchatUser*!*@*": "webchat/users/$ident"
relay:
# This block defines various options for the Relay plugin. You don't need this
# if you aren't using it.
# Determines whether remote opers will have user mode +H (hideoper) set on
# them. This has the benefit of lowering the oper count in /lusers and
# /stats (P|p), but only on IRCds that support it. This defaults to true
# if not set.
hideoper: true
# Determines whether real IPs should be sent across the relay. You should
# generally have a consensus with your linked networks on whether this should
# be turned on. You will see other networks' user IP addresses, and they
# will see yours. Individual networks can also opt out of IP sharing
# both ways by defining "relay_no_ips: true" in their server block.
show_ips: false
# Determines whether NickServ login info should be shown in the /whois output for
# relay users.
# Valid options include "all" (show this to everyone), "opers" (show only to
# opers), and "none" (disabled). Defaults to none if not specified.
whois_show_accounts: all
# Determines whether the origin server should be shown in the /whois output for
# relay users.
# Valid options include "all" (show this to everyone), "opers" (show only to
# opers), and "none" (disabled). Defaults to none if not specified.
whois_show_server: opers
# Determines whether the servers disconnecting in a netsplit should be shown when
# relaying quits due to a netsplit. Defaults to False.
show_netsplits: false
# Sets the default Relay separator. Defaults to / if not specified. The "separator"
# option in server blocks override this if specified.
separator: "/"
# Determines whether all nicks will be tagged by default, instead of only when a
# nick collision happens. It is HIGHLY RECOMMENDED that you enable this, unless you're
# absolutely sure NO ONE will be using the same nick on 2 or more networks in your
# relay.
# This defaults to True if not specified. Disabling this option is currently
# experimental.
tag_nicks: true
# If tag_nicks is False, this specifies a list of NICK globs that network
# tags should be added for anyways (e.g. for network services).
forcetag_nicks:
- "*Serv"
# This determines whether private messages / notices will be forwarded over Clientbot relay,
# and whether the 'rpm' command will be allowed from Clientbot networks. This defaults to
# False.
allow_clientbot_pms: false
# Sets the suffix that relay subservers should use. Defaults to "relay" (as in net1.relay,
# net2.relay, etc.) if not specified.
#server_suffix: "relay.yournet.net"
# Sets whether Clientbot mode sync will be enabled. Valid options:
# "full" - Sync bans, ban/invite exceptions, prefix modes, and all RFC1459-standard modes
# "half" - Sync only bans, ban/invite exceptions, and prefix modes
# "none" - Turns off mode sync. This is the default.
#clientbot_modesync: none
games:
# Sets the nick of the Games service, if you're using it. This defaults to "games" if not defined.
nick: Games
automode:
# Sets the nick of the Automode service, if you're using it. This defaults to "automode" if not defined.
nick: Automode
# For each service, you can also specify what prefix modes you want the service bot to join channels with.
# Setting this to op (+o) for Automode makes it appear more like a standard IRC service, and lessens
# the risk of mode overrides being dropped.
joinmodes: 'o'