Reset pass is now also ini file

This commit is contained in:
JP
2018-11-18 12:09:45 +01:00
parent 044e0733d2
commit c242a9b591
2 changed files with 2 additions and 6 deletions
+1 -2
View File
@@ -2,8 +2,7 @@ __pycache__/
discord.py-rewrite/ discord.py-rewrite/
tijd/ tijd/
.vs/ .vs/
test.png test.png
password.txt
UpgradeLog\.htm UpgradeLog\.htm
markov_dict.npy markov_dict.npy
stroopwafel.ini stroopwafel.ini
+1 -4
View File
@@ -19,8 +19,6 @@ class General(object):
client_id=self.bot.tokens["redditId"] client_id=self.bot.tokens["redditId"]
) )
self.r.read_only = True self.r.read_only = True
f = open("password.txt","r")
self.rebootPW = f.readline()
def __check(self, ctx): #Todo: Is dit het porno kanaal? def __check(self, ctx): #Todo: Is dit het porno kanaal?
return True return True
@@ -81,8 +79,7 @@ class General(object):
@asyncio.coroutine @asyncio.coroutine
def reboot(self, ctx, password=""): def reboot(self, ctx, password=""):
""" Reboot.. """ """ Reboot.. """
print(self.rebootPW) if password == self.bot.passwords["resetpassword"]:
if password == self.rebootPW:
yield from ctx.channel.send("Rebooting.. brb!") yield from ctx.channel.send("Rebooting.. brb!")
os.execv(sys.executable, ['python3'] + sys.argv) os.execv(sys.executable, ['python3'] + sys.argv)
else: else: