소스 검색

ffpb.remoteexec: check that the admin has OP in the channel

Helge Jung 10 년 전
부모
커밋
0577f1d937
1개의 변경된 파일8개의 추가작업 그리고 1개의 파일을 삭제
  1. 8 1
      modules/ffpb.py

+ 8 - 1
modules/ffpb.py

@@ -134,9 +134,16 @@ def ffpb_remoteexec(bot, trigger):
 	target_cmd = bot_params[1]
 
 	if not trigger.admin:
-		bot.say('Captcha required: https://xkcd.com/565/')
+		bot.say('I can haz sudo?')
 		return
 
+	if trigger.is_privmsg:
+		bot.say('Bitte per Channel.')
+		return
+
+	if not trigger.nick in bot.ops[trigger.sender]:
+		bot.say('Geh weg.')
+		return
 
 	target = ffpb_get_address(target_name)
 	if target is None: