1
0
Fork 0
forked from swee/MeowNex

fix bug with cc

This commit is contained in:
swee 2024-09-23 12:11:05 -07:00
parent 4905d44f05
commit e08e1170e5

View file

@ -501,11 +501,11 @@ while True:
run-=1 run-=1
update() update()
else: else:
if path.isfile(cwd + "/cc/" + command[0][1:]): if path.isfile("cc/" + command[0][1:]):
try: try:
com = ['python3'] com = ['python3']
comm = command comm = command
com.append(cwd + "/cc/" + comm[0][1:]) com.append("cc/" + comm[0][1:])
com.append(nick) com.append(nick)
com.append(username) com.append(username)
comm.pop(0) comm.pop(0)
@ -514,9 +514,9 @@ while True:
system(com, channel) 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(cwd + "/cc/" + command[0][1:]): elif path.isdir("cc/" + command[0][1:]):
irc.send_irc(channel, nick + ": Command list under cc/debug:") irc.send_irc(channel, nick + ": Command list under cc/debug:")
irc.send_irc(channel, ", ".join(listdir(cwd + "/cc/" + command[0][1:])) + ".") irc.send_irc(channel, ", ".join(listdir("cc/" + command[0][1:])) + ".")
else: else: