mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-30 14:49:28 +01:00
example-conf, relay, utils: replace 2.0-alpha4 references with 2.0-beta1
This commit is contained in:
parent
bbf1b34b12
commit
086a5f4496
@ -258,7 +258,7 @@ servers:
|
|||||||
# Determines whether IPv6 should be used for this connection. Should the ip:
|
# Determines whether IPv6 should be used for this connection. Should the ip:
|
||||||
# above be a hostname instead of an IP, this will also affect whether A records
|
# above be a hostname instead of an IP, this will also affect whether A records
|
||||||
# (IPv4) or AAAA records (IPv6) will be used in resolving it.
|
# (IPv4) or AAAA records (IPv6) will be used in resolving it.
|
||||||
# As of PyLink 2.0-alpha4, you can leave this unset for direct connections to IP addresses;
|
# As of PyLink 2.0-beta1, you can leave this unset for direct connections to IP addresses;
|
||||||
# the address type will be automatically detected.
|
# the address type will be automatically detected.
|
||||||
#ipv6: yes
|
#ipv6: yes
|
||||||
|
|
||||||
@ -717,7 +717,7 @@ relay:
|
|||||||
# network should be in which pool. A network can be part of one pool, multiple
|
# network should be in which pool. A network can be part of one pool, multiple
|
||||||
# pools, or none at all.
|
# pools, or none at all.
|
||||||
# This option replaces the "relay::show_ips" and network-specific "relay_no_ips"
|
# This option replaces the "relay::show_ips" and network-specific "relay_no_ips"
|
||||||
# options, which are DEPRECATED as of 2.0-alpha4.
|
# options, which are DEPRECATED as of 2.0-beta1.
|
||||||
#ip_share_pools:
|
#ip_share_pools:
|
||||||
# - ["net1", "net2", "net3"]
|
# - ["net1", "net2", "net3"]
|
||||||
# - ["net1", "meganet"]
|
# - ["net1", "meganet"]
|
||||||
|
@ -74,12 +74,12 @@ def main(irc=None):
|
|||||||
initialize_all(ircobj)
|
initialize_all(ircobj)
|
||||||
|
|
||||||
if 'relay_no_ips' in ircobj.serverdata:
|
if 'relay_no_ips' in ircobj.serverdata:
|
||||||
log.warning('(%s) The "relay_no_ips" option is deprecated as of 2.0-alpha4. Consider migrating '
|
log.warning('(%s) The "relay_no_ips" option is deprecated as of 2.0-beta1. Consider migrating '
|
||||||
'to "ip_share_pools", which provides more fine-grained control over which networks '
|
'to "ip_share_pools", which provides more fine-grained control over which networks '
|
||||||
'see which networks\' IPs.', netname)
|
'see which networks\' IPs.', netname)
|
||||||
|
|
||||||
if 'relay' in conf.conf and 'show_ips' in conf.conf['relay']:
|
if 'relay' in conf.conf and 'show_ips' in conf.conf['relay']:
|
||||||
log.warning('The "relay::show_ips" option is deprecated as of 2.0-alpha4. Consider migrating '
|
log.warning('The "relay::show_ips" option is deprecated as of 2.0-beta1. Consider migrating '
|
||||||
'to "ip_share_pools", which provides more fine-grained control over which networks '
|
'to "ip_share_pools", which provides more fine-grained control over which networks '
|
||||||
'see which networks\' IPs.')
|
'see which networks\' IPs.')
|
||||||
|
|
||||||
@ -387,7 +387,7 @@ def spawn_relay_user(irc, remoteirc, user, times_tagged=0, reuse_sid=None):
|
|||||||
'working SID).', irc.name, user, nick, remoteirc.name)
|
'working SID).', irc.name, user, nick, remoteirc.name)
|
||||||
return
|
return
|
||||||
|
|
||||||
# This is the legacy (< 2.0-alpha4) control for relay IP sharing
|
# This is the legacy (< 2.0-beta1) control for relay IP sharing
|
||||||
try:
|
try:
|
||||||
showRealIP = conf.conf['relay']['show_ips'] and not \
|
showRealIP = conf.conf['relay']['show_ips'] and not \
|
||||||
irc.serverdata.get('relay_no_ips') and not \
|
irc.serverdata.get('relay_no_ips') and not \
|
||||||
@ -396,7 +396,7 @@ def spawn_relay_user(irc, remoteirc, user, times_tagged=0, reuse_sid=None):
|
|||||||
except KeyError:
|
except KeyError:
|
||||||
showRealIP = False
|
showRealIP = False
|
||||||
|
|
||||||
# New (>= 2.0-alpha4) IP sharing is configured via pools of networks
|
# New (>= 2.0-beta1) IP sharing is configured via pools of networks
|
||||||
showRealIP = showRealIP or _has_common_pool(irc.name, remoteirc.name, "ip_share_pools")
|
showRealIP = showRealIP or _has_common_pool(irc.name, remoteirc.name, "ip_share_pools")
|
||||||
if showRealIP:
|
if showRealIP:
|
||||||
ip = userobj.ip
|
ip = userobj.ip
|
||||||
@ -2634,7 +2634,7 @@ def linkacl(irc, source, args):
|
|||||||
elif cmd == 'allow':
|
elif cmd == 'allow':
|
||||||
if whitelist:
|
if whitelist:
|
||||||
# In whitelist mode, ALLOW *adds* to the whitelist
|
# In whitelist mode, ALLOW *adds* to the whitelist
|
||||||
if 'allowed_nets' not in entry: # Upgrading from < 2.0-alpha4
|
if 'allowed_nets' not in entry: # Upgrading from < 2.0-beta1
|
||||||
entry['allowed_nets'] = set()
|
entry['allowed_nets'] = set()
|
||||||
db[relay]['allowed_nets'].add(remotenet)
|
db[relay]['allowed_nets'].add(remotenet)
|
||||||
else:
|
else:
|
||||||
|
2
utils.py
2
utils.py
@ -498,7 +498,7 @@ class ServiceBot():
|
|||||||
# Single newlines are stripped so that word wrap can be applied in source
|
# Single newlines are stripped so that word wrap can be applied in source
|
||||||
# code without affecting the output on IRC.
|
# code without affecting the output on IRC.
|
||||||
# (On the same topic, real line wrapping on IRC is done in irc.msg() as of
|
# (On the same topic, real line wrapping on IRC is done in irc.msg() as of
|
||||||
# 2.0-alpha4)
|
# 2.0-beta1)
|
||||||
next_line = ''
|
next_line = ''
|
||||||
for linenum, line in enumerate(lines[1:], 1):
|
for linenum, line in enumerate(lines[1:], 1):
|
||||||
stripped_line = line.strip()
|
stripped_line = line.strip()
|
||||||
|
Loading…
Reference in New Issue
Block a user