|
|
@ -54,14 +54,22 @@ def help(message):
|
|
|
|
def unregs(message):
|
|
|
|
def unregs(message):
|
|
|
|
unreg(message)
|
|
|
|
unreg(message)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@bot.message_handler(commands=['passwd'])
|
|
|
|
|
|
|
|
def passwd(message):
|
|
|
|
|
|
|
|
if checkauth(message):
|
|
|
|
|
|
|
|
bot.reply_to(message, "Введите старый пароль ➣")
|
|
|
|
|
|
|
|
var.steps[message.chat.id]="passwd"
|
|
|
|
|
|
|
|
|
|
|
|
@bot.message_handler(commands=['balance'])
|
|
|
|
@bot.message_handler(commands=['balance'])
|
|
|
|
def balance(message):
|
|
|
|
def balance(message):
|
|
|
|
read()
|
|
|
|
read()
|
|
|
|
|
|
|
|
|
|
|
|
if checkauth(message):
|
|
|
|
if checkauth(message):
|
|
|
|
name=var.db[str(message.chat.id)]
|
|
|
|
name=var.db[str(message.chat.id)]
|
|
|
|
|
|
|
|
sum = format_float_positional(var.db[name])
|
|
|
|
bot.reply_to(message,f"""
|
|
|
|
bot.reply_to(message,f"""
|
|
|
|
Баланс ➣ {var.db[name]} CDM
|
|
|
|
ID/Имя ➣ {var.db[str(message.chat.id)]}
|
|
|
|
|
|
|
|
Баланс ➣ {sum} CDM
|
|
|
|
""")
|
|
|
|
""")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -70,7 +78,7 @@ def change(message):
|
|
|
|
if checkauth(message):
|
|
|
|
if checkauth(message):
|
|
|
|
var.steps[message.chat.id]="change"
|
|
|
|
var.steps[message.chat.id]="change"
|
|
|
|
bot.reply_to(message,"""
|
|
|
|
bot.reply_to(message,"""
|
|
|
|
Пока моментальный ввод/вывод недоступен, извините.
|
|
|
|
1 CDM = 1 алмаз
|
|
|
|
|
|
|
|
|
|
|
|
┌─────Расписание──
|
|
|
|
┌─────Расписание──
|
|
|
|
│17:00 - 22:00 (По Москве)
|
|
|
|
│17:00 - 22:00 (По Москве)
|
|
|
@ -111,7 +119,30 @@ def checks(message):
|
|
|
|
reg(message)
|
|
|
|
reg(message)
|
|
|
|
|
|
|
|
|
|
|
|
elif var.steps[message.chat.id] == "pass":
|
|
|
|
elif var.steps[message.chat.id] == "pass":
|
|
|
|
passwd(message)
|
|
|
|
passs(message)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
elif var.steps[message.chat.id] == "passwd":
|
|
|
|
|
|
|
|
read()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
oldpas = var.db[var.db[str(message.chat.id)]+"_pas"]
|
|
|
|
|
|
|
|
enteredpas = hashlib.sha256(str.encode(message.text)).hexdigest()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if str(oldpas) == str(enteredpas):
|
|
|
|
|
|
|
|
bot.reply_to(message, "Введите новый пароль ➣")
|
|
|
|
|
|
|
|
var.steps[message.chat.id] = "newpass"
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
|
|
|
bot.reply_to(message, "Неверный пароль.")
|
|
|
|
|
|
|
|
var.steps[message.chat.id] = None
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
elif var.steps[message.chat.id] == "newpass":
|
|
|
|
|
|
|
|
newpass = hashlib.sha256(str.encode(message.text)).hexdigest()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var.db[var.db[str(message.chat.id)]+"_pas"] = newpass
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
write()
|
|
|
|
|
|
|
|
bot.reply_to(message, "Пароль успешено изменён.")
|
|
|
|
|
|
|
|
var.steps[message.chat.id] = None
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
elif var.steps[message.chat.id] == "change":
|
|
|
|
elif var.steps[message.chat.id] == "change":
|
|
|
|
if (message.text).lower() != "отмена":
|
|
|
|
if (message.text).lower() != "отмена":
|
|
|
@ -146,6 +177,9 @@ def checks(message):
|
|
|
|
err(message)
|
|
|
|
err(message)
|
|
|
|
|
|
|
|
|
|
|
|
elif var.steps[message.chat.id] == "pnick":
|
|
|
|
elif var.steps[message.chat.id] == "pnick":
|
|
|
|
|
|
|
|
if message.text == "sans":
|
|
|
|
|
|
|
|
var.pnick[message.chat.id] = "_SAN5_SkeLet0n_"
|
|
|
|
|
|
|
|
else:
|
|
|
|
var.pnick[message.chat.id] = message.text
|
|
|
|
var.pnick[message.chat.id] = message.text
|
|
|
|
|
|
|
|
|
|
|
|
if var.pnum[message.chat.id] < 1:
|
|
|
|
if var.pnum[message.chat.id] < 1:
|
|
|
|