diff --git a/code/_helpers/logging.dm b/code/_helpers/logging.dm index 18cede2ea4..923b8f450f 100644 --- a/code/_helpers/logging.dm +++ b/code/_helpers/logging.dm @@ -49,7 +49,7 @@ for(var/client/C in admins) if(C.is_preference_enabled(/datum/client_preference/debug/show_debug_logs)) - to_chat(C, "DEBUG: [text]") + to_chat(C, "DEBUG: [text]") /proc/log_game(text) if (config.log_game) diff --git a/code/modules/admin/DB ban/functions.dm b/code/modules/admin/DB ban/functions.dm index fc1a8e05ca..48eb275a9e 100644 --- a/code/modules/admin/DB ban/functions.dm +++ b/code/modules/admin/DB ban/functions.dm @@ -83,7 +83,7 @@ datum/admins/proc/DB_ban_record(var/bantype, var/mob/banned_mob, var/duration = var/sql = "INSERT INTO erro_ban (`id`,`bantime`,`serverip`,`bantype`,`reason`,`job`,`duration`,`rounds`,`expiration_time`,`ckey`,`computerid`,`ip`,`a_ckey`,`a_computerid`,`a_ip`,`who`,`adminwho`,`edits`,`unbanned`,`unbanned_datetime`,`unbanned_ckey`,`unbanned_computerid`,`unbanned_ip`) VALUES (null, Now(), '[serverip]', '[bantype_str]', '[reason]', '[job]', [(duration)?"[duration]":"0"], [(rounds)?"[rounds]":"0"], Now() + INTERVAL [(duration>0) ? duration : 0] MINUTE, '[ckey]', '[computerid]', '[ip]', '[a_ckey]', '[a_computerid]', '[a_ip]', '[who]', '[adminwho]', '', null, null, null, null, null)" var/DBQuery/query_insert = dbcon.NewQuery(sql) query_insert.Execute() - to_chat(usr, "Ban saved to database.") + to_chat(usr, "Ban saved to database.") message_admins("[key_name_admin(usr)] has added a [bantype_str] for [ckey] [(job)?"([job])":""] [(duration > 0)?"([duration] minutes)":""] with the reason: \"[reason]\" to the ban database.",1) @@ -137,17 +137,17 @@ datum/admins/proc/DB_ban_unban(var/ckey, var/bantype, var/job = "") ban_number++; if(ban_number == 0) - to_chat(usr, "Database update failed due to no bans fitting the search criteria. If this is not a legacy ban you should contact the database admin.") + to_chat(usr, "Database update failed due to no bans fitting the search criteria. If this is not a legacy ban you should contact the database admin.") return if(ban_number > 1) - to_chat(usr, "Database update failed due to multiple bans fitting the search criteria. Note down the ckey, job and current time and contact the database admin.") + to_chat(usr, "Database update failed due to multiple bans fitting the search criteria. Note down the ckey, job and current time and contact the database admin.") return if(istext(ban_id)) ban_id = text2num(ban_id) if(!isnum(ban_id)) - to_chat(usr, "Database update failed due to a ban ID mismatch. Contact the database admin.") + to_chat(usr, "Database update failed due to a ban ID mismatch. Contact the database admin.") return DB_ban_unban_by_id(ban_id) @@ -173,7 +173,7 @@ datum/admins/proc/DB_ban_edit(var/banid = null, var/param = null) duration = query.item[2] reason = query.item[3] else - to_chat(usr, "Invalid ban id. Contact the database admin") + to_chat(usr, "Invalid ban id. Contact the database admin") return reason = sql_sanitize_text(reason) @@ -205,12 +205,8 @@ datum/admins/proc/DB_ban_edit(var/banid = null, var/param = null) if(alert("Unban [pckey]?", "Unban?", "Yes", "No") == "Yes") DB_ban_unban_by_id(banid) return - else - to_chat(usr, "Cancelled") - return - else - to_chat(usr, "Cancelled") - return + to_chat(usr, "Cancelled") + return datum/admins/proc/DB_ban_unban_by_id(var/id) @@ -232,11 +228,11 @@ datum/admins/proc/DB_ban_unban_by_id(var/id) ban_number++; if(ban_number == 0) - to_chat(usr, "Database update failed due to a ban id not being present in the database.") + to_chat(usr, "Database update failed due to a ban id not being present in the database.") return if(ban_number > 1) - to_chat(usr, "Database update failed due to multiple bans having the same ID. Contact the database admin.") + to_chat(usr, "Database update failed due to multiple bans having the same ID. Contact the database admin.") return if(!src.owner || !istype(src.owner, /client)) @@ -272,7 +268,7 @@ datum/admins/proc/DB_ban_unban_by_id(var/id) establish_db_connection() if(!dbcon.IsConnected()) - to_chat(usr, "Failed to establish database connection") + to_chat(usr, "Failed to establish database connection") return var/output = "