diff --git a/sweebot.py b/sweebot.py index 11303bd..7c9c257 100644 --- a/sweebot.py +++ b/sweebot.py @@ -501,11 +501,11 @@ while True: run-=1 update() else: - if path.isfile(cwd + "/cc/" + command[0][1:]): + if path.isfile("cc/" + command[0][1:]): try: com = ['python3'] comm = command - com.append(cwd + "/cc/" + comm[0][1:]) + com.append("cc/" + comm[0][1:]) com.append(nick) com.append(username) comm.pop(0) @@ -514,9 +514,9 @@ while True: system(com, channel) except Exception as ex: 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, ", ".join(listdir(cwd + "/cc/" + command[0][1:])) + ".") + irc.send_irc(channel, ", ".join(listdir("cc/" + command[0][1:])) + ".") else: