瀏覽代碼

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

Helge Jung 9 年之前
父節點
當前提交
606ccd1fe1
共有 1 個文件被更改,包括 1 次插入1 次删除
  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>')