3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-23 19:19:31 +01:00

bots: allow JOIN/NICK/QUIT on ServiceBot clients

This commit is contained in:
James Lu 2016-09-19 18:23:11 -07:00
parent c62dd272d6
commit 1c86f32003

View File

@ -74,7 +74,7 @@ def joinclient(irc, source, args):
irc.reply("Error: No valid channels given.")
return
if not irc.isManipulatableClient(u):
if not (irc.isManipulatableClient(u) or irc.isServiceBot(u)):
irc.reply("Error: Cannot force join a protected PyLink services client.")
return
@ -116,7 +116,7 @@ def nick(irc, source, args):
irc.reply('Error: Invalid nickname %r.' % newnick)
return
elif not irc.isManipulatableClient(u):
elif not (irc.isManipulatableClient(u) or irc.isServiceBot(u)):
irc.reply("Error: Cannot force nick changes for a protected PyLink services client.")
return
@ -158,7 +158,7 @@ def part(irc, source, args):
irc.reply("Error: No valid channels given.")
return
if not irc.isManipulatableClient(u):
if not (irc.isManipulatableClient(u) or irc.isServiceBot(u)):
irc.reply("Error: Cannot force part a protected PyLink services client.")
return