3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-12-24 11:42:51 +01:00

relay: block clientbot networks from hosting relays

This commit is contained in:
James Lu 2016-08-04 10:55:00 -07:00
parent 7a0fd1caa3
commit 72da00d23c

View File

@ -1480,9 +1480,13 @@ def create(irc, source, args):
if not utils.isChannel(channel):
irc.reply('Error: Invalid channel %r.' % channel)
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:
irc.reply('Error: You must be in %r to complete this operation.' % channel)
return
irc.checkAuthenticated(source)
# Check to see whether the channel requested is already part of a different