* clown time

* let the shitfest begin

* wild

* kill me

* sad

* format

* regex

* erase manual dbcore connect procs

* fix async

* replacements, RunQuery()

* replacements

* more

* update

* epic

* fix

* a

* a

* more queries

* queries

* queries

* queries

* test

* 4

* conversions

* fix

* a

* that

* prefixed

* connection log

* schema

* prefixed

* wack

* oops

* fix

* Travis gaming

* rid that

* a

* prefix that

* prefix that

* OH THATS IMPORTANT

* bandaid

* fixes

* Update database_changelog.md

Co-authored-by: VM_USER <VM_USER>
This commit is contained in:
silicons
2022-08-02 02:51:01 -07:00
committed by GitHub
co-authored by VM_USER <VM_USER>
parent 0c01294a27
commit 7dffc24138
47 changed files with 1796 additions and 932 deletions
@@ -0,0 +1,30 @@
/client/proc/reestablish_db_connection()
set category = "Special Verbs"
set name = "Reestablish DB Connection"
if (!CONFIG_GET(flag/sql_enabled))
to_chat(usr, "<span class='adminnotice'>The Database is not enabled!</span>")
return
if (SSdbcore.IsConnected())
if (!check_rights(R_DEBUG,0))
alert("The database is already connected! (Only those with +debug can force a reconnection)", "The database is already connected!")
return
var/reconnect = alert("The database is already connected! If you *KNOW* that this is incorrect, you can force a reconnection", "The database is already connected!", "Force Reconnect", "Cancel")
if (reconnect != "Force Reconnect")
return
SSdbcore.Disconnect()
log_admin("[key_name(usr)] has forced the database to disconnect")
message_admins("[key_name_admin(usr)] has <b>forced</b> the database to disconnect!")
// SSblackbox.record_feedback("tally", "admin_verb", 1, "Force Reestablished Database Connection") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
log_admin("[key_name(usr)] is attempting to re-established the DB Connection")
message_admins("[key_name_admin(usr)] is attempting to re-established the DB Connection")
// SSblackbox.record_feedback("tally", "admin_verb", 1, "Reestablished Database Connection") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
SSdbcore.failed_connections = 0
if(!SSdbcore.Connect())
message_admins("Database connection failed: " + SSdbcore.ErrorMsg())
else
message_admins("Database connection re-established")