3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-01 01:09:22 +01:00

relay: allow default LINKACL mode to be configured as an option (#394)

This commit is contained in:
James Lu 2018-05-11 13:09:33 -07:00
parent fb6aa88d83
commit aa4cedd945
2 changed files with 8 additions and 1 deletions

View File

@ -696,6 +696,11 @@ relay:
# servers::<netname>::relay_server_suffix.
#server_suffix: "relay.yournet.net"
# Determines whether LINKACL should use whitelist or blacklist mode by default. This defaults
# to false, and can also be specified per network via the 'relay_linkacl_use_whitelist' option
# in a server block.
#linkacl_use_whitelist: false
# Sets whether Clientbot mode sync will be enabled. Valid options:
# "full" - Sync bans, ban/invite exceptions, prefix modes, and all RFC1459-standard modes. The
# bot will need op in the Clientbot channel for this to work both ways.

View File

@ -2114,7 +2114,9 @@ def create(irc, source, args):
# pair - this is just a dict with various keys.
db[(irc.name, channel)] = {'claim': [irc.name], 'links': set(),
'blocked_nets': set(), 'creator': creator,
'ts': time.time()}
'ts': time.time(),
'use_whitelist': irc.get_service_option('relay', 'linkacl_use_whitelist', False),
'allowed_nets': set()}
log.info('(%s) relay: Channel %s created by %s.', irc.name, channel, creator)
initialize_channel(irc, channel)
irc.reply('Done.')