Browse Source

긴급 도구 기능 수정 및 버그 패치

Surplus_Up (2DU) 7 years ago
parent
commit
ae70ecba68
2 changed files with 4 additions and 5 deletions
  1. 0 3
      app.py
  2. 4 2
      emergency_tool.py

+ 0 - 3
app.py

@@ -251,9 +251,6 @@ else:
 curs.execute('delete from other where name = "ver"')
 curs.execute('insert into other (name, data) values ("ver", ?)', [c_ver])
 
-json_data = open(os.path.join('language', rep_language + '.json'), 'rt', encoding='utf-8').read()
-lang_data = json.loads(json_data)
-
 def back_up():
     try:
         shutil.copyfile(set_data['db'] + '.db', 'back_' + set_data['db'] + '.db')

+ 4 - 2
emergency_tool.py

@@ -16,7 +16,7 @@ conn = sqlite3.connect(set_data['db'] + '.db', check_same_thread = False)
 curs = conn.cursor()
 
 # 연결 전달
-load_conn2(conn)
+load_conn(conn)
 
 print('1. BackLink ReSet')
 print('2. ReCaptcha Delete')
@@ -58,8 +58,10 @@ elif what_i_do == '3':
         band = ''
 
     # 데이터 삭제
-    curs.execute("insert into rb (block, end, today, blocker, why, band) values (?, ?, ?, ?, ?, ?)", [user_data, 'Emergency Release', get_time(), 'localhost', '', band])
+    curs.execute("insert into rb (block, end, today, blocker, why, band) values (?, ?, ?, ?, ?, ?)", [user_data, load_lang('release', 1), get_time(), load_lang('tool', 1) + ':Emergency', '', band])
     curs.execute("delete from ban where block = ?", [user_data])
 
+print('OK')
+
 # 커밋
 conn.commit()