Fix 'if' statement on Panic Bunker

Prints error message when it doesn't need to and works fine. Also moves check up slightly to prevent an exploit.
This commit is contained in:
Arokha Sieyes
2017-04-10 23:39:50 -04:00
parent b3d652fa50
commit ba1221889c
2 changed files with 9 additions and 10 deletions
+1 -1
View File
@@ -9,7 +9,7 @@
log_admin("[key_name(usr)] has toggled the Panic Bunker, it is now [(config.panic_bunker?"on":"off")]")
message_admins("[key_name_admin(usr)] has toggled the Panic Bunker, it is now [(config.panic_bunker?"enabled":"disabled")].")
if (config.panic_bunker && (dbcon || dbcon.IsConnected()))
if (config.panic_bunker && (!dbcon || !dbcon.IsConnected()))
message_admins("The Database is not connected! Panic bunker will not work until the connection is reestablished.")
feedback_add_details("admin_verb","PANIC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!