mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-24 03:29:28 +01:00
relay: don't allow creating a channel that's already part of a relay
This commit is contained in:
parent
8faf86aa8f
commit
cb83db4c1c
@ -808,6 +808,10 @@ def create(irc, source, args):
|
||||
if not utils.isOper(irc, source):
|
||||
utils.msg(irc, source, 'Error: You must be opered in order to complete this operation.')
|
||||
return
|
||||
localentry = findRelay((irc.name, channel))
|
||||
if localentry:
|
||||
utils.msg(irc, source, 'Error: Channel %r is already part of a relay.' % channel)
|
||||
return
|
||||
db[(irc.name, channel)] = {'claim': [irc.name], 'links': set(), 'blocked_nets': set()}
|
||||
initializeChannel(irc, channel)
|
||||
utils.msg(irc, source, 'Done.')
|
||||
|
Loading…
Reference in New Issue
Block a user