Преглед изворни кода

필터링 버그 수정(?)

Surplus_Up (2DU) пре 7 година
родитељ
комит
76ca11d93d
1 измењених фајлова са 5 додато и 0 уклоњено
  1. 5 0
      route/tool/func.py

+ 5 - 0
route/tool/func.py

@@ -833,10 +833,15 @@ def history_plus(title, data, date, ip, send, leng):
     curs.execute("select id from history where title = ? order by id + 0 desc limit 1", [title])
     id_data = curs.fetchall()
 
+    get_type = re.search('(\((?:(?:(?!\)).)+)\))', get_type)
+
     send = re.sub('\(|\)|<|>', '', send)
 
     if len(send) > 128:
         send = send[:128]
+
+    if get_type:
+        send += get_type.groups()[0]
     
     curs.execute("insert into history (id, title, data, date, ip, send, leng, hide) values (?, ?, ?, ?, ?, ?, ?, '')", [
         str(int(id_data[0][0]) + 1) if id_data else '1',