mirror of
https://github.com/jlu5/PyLink.git
synced 2025-01-12 21:22:36 +01:00
relay: block clientbot networks from hosting relays
This commit is contained in:
parent
7a0fd1caa3
commit
72da00d23c
@ -1480,9 +1480,13 @@ def create(irc, source, args):
|
|||||||
if not utils.isChannel(channel):
|
if not utils.isChannel(channel):
|
||||||
irc.reply('Error: Invalid channel %r.' % channel)
|
irc.reply('Error: Invalid channel %r.' % channel)
|
||||||
return
|
return
|
||||||
|
if irc.protoname == 'clientbot':
|
||||||
|
irc.reply('Error: Clientbot networks cannot be used to host a relay.')
|
||||||
|
return
|
||||||
if source not in irc.channels[channel].users:
|
if source not in irc.channels[channel].users:
|
||||||
irc.reply('Error: You must be in %r to complete this operation.' % channel)
|
irc.reply('Error: You must be in %r to complete this operation.' % channel)
|
||||||
return
|
return
|
||||||
|
|
||||||
irc.checkAuthenticated(source)
|
irc.checkAuthenticated(source)
|
||||||
|
|
||||||
# Check to see whether the channel requested is already part of a different
|
# Check to see whether the channel requested is already part of a different
|
||||||
|
Loading…
Reference in New Issue
Block a user