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

bots: don't allow 'spawnclient' on protocols where it is stubbed

This commit is contained in:
James Lu 2017-12-22 12:24:58 -08:00
parent 958bb351ca
commit c62580d228

View File

@ -12,6 +12,11 @@ def spawnclient(irc, source, args):
Spawns the specified client on the PyLink server.
Note: this doesn't check the validity of any fields you give it!"""
if not irc.has_cap('can-spawn-clients'):
irc.error("This network does not support client spawning.")
return
permissions.check_permissions(irc, source, ['bots.spawnclient'])
try:
nick, ident, host = args[:3]