diff --git a/example-conf.yml b/example-conf.yml index 5cc20f4..0a3e8a7 100644 --- a/example-conf.yml +++ b/example-conf.yml @@ -701,6 +701,11 @@ relay: # in a server block. #linkacl_use_whitelist: false + # Determines whether CLAIM should be enabled by default for newly created channels. + # This defaults to true, and can also be specified per network via the 'enable_default_claim' + # option in a server block. + #enable_default_claim: true + # 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. diff --git a/plugins/relay.py b/plugins/relay.py index 8d0df86..7f8a04e 100644 --- a/plugins/relay.py +++ b/plugins/relay.py @@ -2127,11 +2127,14 @@ def create(irc, source, args): creator = irc.get_hostmask(source) # Create the relay database entry with the (network name, channel name) # pair - this is just a dict with various keys. - db[(irc.name, channel)] = {'claim': [irc.name], 'links': set(), - 'blocked_nets': set(), 'creator': creator, + db[(irc.name, channel)] = {'links': set(), + 'blocked_nets': set(), + 'creator': creator, 'ts': time.time(), 'use_whitelist': irc.get_service_option('relay', 'linkacl_use_whitelist', False), - 'allowed_nets': set()} + 'allowed_nets': set(), + 'claim': [irc.name] if irc.get_service_option('relay', 'enable_default_claim', True) + else []} log.info('(%s) relay: Channel %s created by %s.', irc.name, channel, creator) initialize_channel(irc, channel) irc.reply('Done.')