From c242a9b5918a3d00e17e52f2aff39052b3856155 Mon Sep 17 00:00:00 2001 From: JP Date: Sun, 18 Nov 2018 12:09:45 +0100 Subject: [PATCH] Reset pass is now also ini file --- .gitignore | 3 +-- General.py | 5 +---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 62a5d2b..26b0503 100644 --- a/.gitignore +++ b/.gitignore @@ -2,8 +2,7 @@ __pycache__/ discord.py-rewrite/ tijd/ .vs/ -test.png -password.txt +test.png UpgradeLog\.htm markov_dict.npy stroopwafel.ini diff --git a/General.py b/General.py index 9f4e3d4..db5f48e 100644 --- a/General.py +++ b/General.py @@ -19,8 +19,6 @@ class General(object): client_id=self.bot.tokens["redditId"] ) self.r.read_only = True - f = open("password.txt","r") - self.rebootPW = f.readline() def __check(self, ctx): #Todo: Is dit het porno kanaal? return True @@ -81,8 +79,7 @@ class General(object): @asyncio.coroutine def reboot(self, ctx, password=""): """ Reboot.. """ - print(self.rebootPW) - if password == self.rebootPW: + if password == self.bot.passwords["resetpassword"]: yield from ctx.channel.send("Rebooting.. brb!") os.execv(sys.executable, ['python3'] + sys.argv) else: