Explorar o código

properly handle missing parameters to \!exec-on-peer

Helge Jung %!s(int64=9) %!d(string=hai) anos
pai
achega
606ccd1fe1
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      modules/ffpb.py

+ 1 - 1
modules/ffpb.py

@@ -813,7 +813,7 @@ def ffpb_nodemesh(bot, trigger):
 def ffpb_remoteexec(bot, trigger):
     """Remote execution on the given node"""
 
-    bot_params = trigger.group(2).split(' ', 1)
+    bot_params = trigger.group(2).split(' ', 1) if trigger.group(2) is not None else []
     if len(bot_params) != 2:
         bot.say('Wenn du nicht sagst wo mach ich remote execution bei dir!')
         bot.say('Tipp: !exec-on-peer <peer> <cmd>')