add multiline perms to cc
This commit is contained in:
parent
9da0939763
commit
229072cddd
1 changed files with 13 additions and 10 deletions
23
sweebot.py
23
sweebot.py
|
@ -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:]):
|
||||||
|
|
Loading…
Reference in a new issue