forked from swee/MeowNex
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)
|
||||
|
||||
else:
|
||||
if command[0][:3] == "$.." or command[0][:2] == "$/":
|
||||
if ".." in command[0][:3]:
|
||||
irc.send_irc(channel, nick + ": Nice try.")
|
||||
block+=1
|
||||
run-=1
|
||||
|
@ -551,15 +551,18 @@ while True:
|
|||
else:
|
||||
if path.isfile("cc/" + command[0][1:]):
|
||||
try:
|
||||
com = ['python3']
|
||||
comm = command
|
||||
com.append("cc/" + comm[0][1:])
|
||||
com.append(nick)
|
||||
com.append(username)
|
||||
comm.pop(0)
|
||||
for i in comm:
|
||||
com.append(i)
|
||||
system(com, channel)
|
||||
if sbconfig.cflagexist(channel, "-multiline") and "#require-multiline" in open("cc/" + command[0][1:]).read():
|
||||
irc.send_irc(channel, "Multiline commands are disabled in this channel.")
|
||||
else:
|
||||
com = ['python3']
|
||||
comm = command
|
||||
com.append("cc/" + comm[0][1:])
|
||||
com.append(nick)
|
||||
com.append(username)
|
||||
comm.pop(0)
|
||||
for i in comm:
|
||||
com.append(i)
|
||||
system(com, channel)
|
||||
except Exception as ex:
|
||||
irc.send_irc(channel, nick + ": " + ex.__class__.__name__)
|
||||
elif path.isdir("cc/" + command[0][1:]):
|
||||
|
|
Loading…
Reference in a new issue