mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 19:52:40 +00:00
Makes the dialog/attacklog tables clear again after each round (#10121)
This commit is contained in:
@@ -641,6 +641,24 @@ var/failed_old_db_connections = 0
|
|||||||
to_world_log("Your server failed to establish a connection with the feedback database.")
|
to_world_log("Your server failed to establish a connection with the feedback database.")
|
||||||
else
|
else
|
||||||
to_world_log("Feedback database connection established.")
|
to_world_log("Feedback database connection established.")
|
||||||
|
// CHOMPEdit Begin - Truncating the temporary dialog/attacklog tables
|
||||||
|
var/datum/db_query/query_truncate = SSdbcore.NewQuery("TRUNCATE erro_dialog")
|
||||||
|
var/num_tries = 0
|
||||||
|
while(!query_truncate.Execute() && num_tries<5)
|
||||||
|
num_tries++
|
||||||
|
|
||||||
|
if(num_tries==5)
|
||||||
|
log_admin("ERROR TRYING TO CLEAR erro_dialog")
|
||||||
|
qdel(query_truncate)
|
||||||
|
var/datum/db_query/query_truncate2 = SSdbcore.NewQuery("TRUNCATE erro_attacklog")
|
||||||
|
num_tries = 0
|
||||||
|
while(!query_truncate2.Execute() && num_tries<5)
|
||||||
|
num_tries++
|
||||||
|
|
||||||
|
if(num_tries==5)
|
||||||
|
log_admin("ERROR TRYING TO CLEAR erro_attacklog")
|
||||||
|
qdel(query_truncate2)
|
||||||
|
// CHOMPEdit End
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
/proc/setup_database_connection()
|
/proc/setup_database_connection()
|
||||||
|
|||||||
Reference in New Issue
Block a user