Generalizing establish_db_connection() and setup_database_connection()

Both procs are now generalized, and accept a DBConnection object as an argument. Due to this generalization, all instances of `establish_db_connection()` must be renamed to `establish_db_connection(dbcon)`.
Also added variable `failed_connections` to the definition of DBConnection.
This commit is contained in:
skull132
2016-03-04 00:53:37 +02:00
parent d46499a310
commit 8383f1c03b
20 changed files with 66 additions and 63 deletions
+2 -2
View File
@@ -203,7 +203,7 @@
// Returns null if no DB connection can be established, or -1 if the requested key was not found in the database
/proc/get_player_age(key)
establish_db_connection()
establish_db_connection(dbcon)
if(!dbcon.IsConnected())
return null
@@ -223,7 +223,7 @@
if ( IsGuestKey(src.key) )
return
establish_db_connection()
establish_db_connection(dbcon)
if(!dbcon.IsConnected())
return