Tweaks panic bunker verb logic a little bit

Allows toggling even if the database is not connected, alerts admins instead.
This commit is contained in:
MrStonedOne
2015-02-26 16:02:26 -08:00
parent 8a798c59b6
commit af4c2d86d6
+4 -5
View File
@@ -5,12 +5,11 @@
usr << "<span class='adminnotice'>The Database is not enabled!</span>"
return
if (!dbcon || !dbcon.IsConnected())
usr << "<span class='adminnotice'>The Database is not connected!</span>"
return
config.panic_bunker = (!config.panic_bunker)
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?"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()))
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!