Update V4.py

This commit is contained in:
Augustin 2022-11-16 18:11:18 +01:00 committed by GitHub
parent da5e60f8b7
commit f4ebb39fdf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 16 additions and 2 deletions

18
V4.py
View File

@ -1,6 +1,6 @@
#!/usr/bin/python3.10 #!/usr/bin/python3.10
import asyncio import asyncio
from csv import reader import csv
from os import sys, system, path from os import sys, system, path
from random import choice, randint, shuffle, uniform from random import choice, randint, shuffle, uniform
from re import findall, search from re import findall, search
@ -907,7 +907,19 @@ def unban2():
except Banned : except Banned :
unban() unban()
except NotBanned : except NotBanned :
printf("you are not cureently banned on this account") printf("you are not currently banned on this account")
def SavePointsFromFile(file):
with open(file) as f:
reader = csv.reader(f)
points_list = list(reader)
for item in points_list:
compte, points = item[0], item[1]
add_to_database(compte, points, sql_host,sql_usr,sql_pwd,sql_database, save_if_fail=False)
with open(file, "w") as f:
f.write("")
def StartTask(task): def StartTask(task):
@ -939,6 +951,8 @@ if CUSTOM_START:
CustomStart(Credentials) CustomStart(Credentials)
elif UNBAN: elif UNBAN:
unban2() unban2()
elif POINTS_FILE != "":
SavePointsFromFile(POINTS_FILE)
else: else:
with Progress( with Progress(