mirror of
https://github.com/jlu5/PyLink.git
synced 2024-12-25 20:22:45 +01:00
relay: allow disabling free link access for all opers
This commit is contained in:
parent
5617224780
commit
8c42825612
@ -640,6 +640,14 @@ relay:
|
|||||||
# This block defines various options for the Relay plugin. You don't need this
|
# This block defines various options for the Relay plugin. You don't need this
|
||||||
# if you aren't using it.
|
# if you aren't using it.
|
||||||
|
|
||||||
|
# Determines whether all opers should be able to create, link, delink, destroy,
|
||||||
|
# and adjust claim settings on relay channels. You can disable this if you want
|
||||||
|
# to configure link permissions in a more fine grained way, e.g. by granting each
|
||||||
|
# network admin their own PyLink account.
|
||||||
|
# This defaults to True if not set, for consistency with older (< 2.0) PyLink versions.
|
||||||
|
# Changing this setting requires a rehash and reload of the Relay plugin to apply.
|
||||||
|
allow_free_oper_links: true
|
||||||
|
|
||||||
# Determines whether all relay users' nicks will be tagged with their network, instead of only
|
# Determines whether all relay users' nicks will be tagged with their network, instead of only
|
||||||
# when a nick collision occurs. It is recommended that you either leave this on or maintain a
|
# when a nick collision occurs. It is recommended that you either leave this on or maintain a
|
||||||
# list of nicks in "forcetag_nicks", so that your users don't complain about "nick in use"
|
# list of nicks in "forcetag_nicks", so that your users don't complain about "nick in use"
|
||||||
|
@ -27,9 +27,9 @@ datastore = structures.PickleDataStore('pylinkrelay', dbname)
|
|||||||
db = datastore.store
|
db = datastore.store
|
||||||
|
|
||||||
default_permissions = {"*!*@*": ['relay.linked'],
|
default_permissions = {"*!*@*": ['relay.linked'],
|
||||||
"$ircop": ['relay.create', 'relay.linkacl*',
|
"$ircop": ['relay.linkacl*']}
|
||||||
'relay.destroy', 'relay.link', 'relay.delink',
|
default_oper_permissions = {"$ircop": ['relay.create', 'relay.destroy', 'relay.link',
|
||||||
'relay.claim']}
|
'relay.delink', 'relay.claim']}
|
||||||
|
|
||||||
### INTERNAL FUNCTIONS
|
### INTERNAL FUNCTIONS
|
||||||
|
|
||||||
@ -63,6 +63,9 @@ def main(irc=None):
|
|||||||
|
|
||||||
permissions.add_default_permissions(default_permissions)
|
permissions.add_default_permissions(default_permissions)
|
||||||
|
|
||||||
|
if 'relay' in conf.conf and conf.conf['relay'].get('allow_free_oper_links', True):
|
||||||
|
permissions.add_default_permissions(default_oper_permissions)
|
||||||
|
|
||||||
if irc is not None:
|
if irc is not None:
|
||||||
# irc is defined when the plugin is reloaded. Otherwise, it means that we've just started the
|
# irc is defined when the plugin is reloaded. Otherwise, it means that we've just started the
|
||||||
# server. Iterate over all connected networks and initialize their relay users.
|
# server. Iterate over all connected networks and initialize their relay users.
|
||||||
@ -103,6 +106,7 @@ def die(irc=None):
|
|||||||
|
|
||||||
# 3) Unload our permissions.
|
# 3) Unload our permissions.
|
||||||
permissions.remove_default_permissions(default_permissions)
|
permissions.remove_default_permissions(default_permissions)
|
||||||
|
permissions.remove_default_permissions(default_oper_permissions)
|
||||||
|
|
||||||
# 4) Save the database.
|
# 4) Save the database.
|
||||||
datastore.die()
|
datastore.die()
|
||||||
|
Loading…
Reference in New Issue
Block a user