1
0
Fork 0
forked from swee/MeowNex

add multiline perms to cc

This commit is contained in:
Swee 2024-10-12 17:18:12 -07:00
parent 9da0939763
commit 229072cddd

View file

@ -543,7 +543,7 @@ while True:
multiline(str(ex), channel) multiline(str(ex), channel)
else: else:
if command[0][:3] == "$.." or command[0][:2] == "$/": if ".." in command[0][:3]:
irc.send_irc(channel, nick + ": Nice try.") irc.send_irc(channel, nick + ": Nice try.")
block+=1 block+=1
run-=1 run-=1
@ -551,15 +551,18 @@ while True:
else: else:
if path.isfile("cc/" + command[0][1:]): if path.isfile("cc/" + command[0][1:]):
try: try:
com = ['python3'] if sbconfig.cflagexist(channel, "-multiline") and "#require-multiline" in open("cc/" + command[0][1:]).read():
comm = command irc.send_irc(channel, "Multiline commands are disabled in this channel.")
com.append("cc/" + comm[0][1:]) else:
com.append(nick) com = ['python3']
com.append(username) comm = command
comm.pop(0) com.append("cc/" + comm[0][1:])
for i in comm: com.append(nick)
com.append(i) com.append(username)
system(com, channel) comm.pop(0)
for i in comm:
com.append(i)
system(com, channel)
except Exception as ex: except Exception as ex:
irc.send_irc(channel, nick + ": " + ex.__class__.__name__) irc.send_irc(channel, nick + ": " + ex.__class__.__name__)
elif path.isdir("cc/" + command[0][1:]): elif path.isdir("cc/" + command[0][1:]):