Reset pass is now also ini file
This commit is contained in:
@@ -3,7 +3,6 @@ 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
@@ -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:
|
||||||
|
|||||||
Reference in New Issue
Block a user