diff --git a/code/modules/admin/DB_ban/functions.dm b/code/modules/admin/DB_ban/functions.dm
index dccfaf411e2..3427df551d8 100644
--- a/code/modules/admin/DB_ban/functions.dm
+++ b/code/modules/admin/DB_ban/functions.dm
@@ -500,7 +500,7 @@
var/bantype = query_search_bans.item[3]
var/reason = query_search_bans.item[4]
var/job = query_search_bans.item[5]
- var/duration = query_search_bans.item[6]
+ var/duration = text2num(query_search_bans.item[6])
var/expiration = query_search_bans.item[7]
var/ban_key = query_search_bans.item[8]
var/a_key = query_search_bans.item[9]
@@ -521,15 +521,15 @@
if("PERMABAN")
typedesc = "PERMABAN"
if("TEMPBAN")
- typedesc = "TEMPBAN
([duration] minutes [(unbanned) ? "" : "(Edit))"]
Expires [expiration]"
+ typedesc = "TEMPBAN
([DisplayTimeText(duration MINUTES)] [(unbanned) ? "" : "(Edit))"]
Expires [expiration]"
if("JOB_PERMABAN")
typedesc = "JOBBAN
([job])"
if("JOB_TEMPBAN")
- typedesc = "TEMP JOBBAN
([job])
([duration] minutes [(unbanned) ? "" : "(Edit))"]
Expires [expiration]"
+ typedesc = "TEMP JOBBAN
([job])
([DisplayTimeText(duration MINUTES)] [(unbanned) ? "" : "(Edit))"]
Expires [expiration]"
if("ADMIN_PERMABAN")
typedesc = "ADMIN PERMABAN"
if("ADMIN_TEMPBAN")
- typedesc = "ADMIN TEMPBAN
([duration] minutes [(unbanned) ? "" : "(Edit))"]
Expires [expiration]"
+ typedesc = "ADMIN TEMPBAN
([DisplayTimeText(duration MINUTES)] [(unbanned) ? "" : "(Edit))"]
Expires [expiration]"
output += ""
output += "| [typedesc] | "
diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm
index bec7767c1ae..cfc8c0c343e 100644
--- a/code/modules/admin/topic.dm
+++ b/code/modules/admin/topic.dm
@@ -1004,23 +1004,24 @@
if(!severity)
return
var/msg
+ var/fancy_jobban_duration = DisplayTimeText(mins MINUTES)
for(var/job in notbannedlist)
if(!DB_ban_record(BANTYPE_JOB_TEMP, M, mins, reason, job))
to_chat(usr, "Failed to apply ban.")
return
if(M.client)
jobban_buildcache(M.client)
- ban_unban_log_save("[key_name(usr)] temp-jobbanned [key_name(M)] from [job] for [mins] minutes. reason: [reason]")
- log_admin_private("[key_name(usr)] temp-jobbanned [key_name(M)] from [job] for [mins] minutes.")
+ ban_unban_log_save("[key_name(usr)] temp-jobbanned [key_name(M)] from [job] for [fancy_jobban_duration]. reason: [reason]")
+ log_admin_private("[key_name(usr)] temp-jobbanned [key_name(M)] from [job] for [fancy_jobban_duration].")
if(!msg)
msg = job
else
msg += ", [job]"
create_message("note", M.key, null, "Banned from [msg] - [reason]", null, null, 0, 0, null, 0, severity)
- message_admins("[key_name_admin(usr)] banned [key_name_admin(M)] from [msg] for [mins] minutes.")
+ message_admins("[key_name_admin(usr)] banned [key_name_admin(M)] from [msg] for [fancy_jobban_duration].")
to_chat(M, "You have been [(msg == ("ooc" || "appearance")) ? "banned" : "jobbanned"] by [usr.client.key] from: [msg].")
to_chat(M, "The reason is: [reason]")
- to_chat(M, "This jobban will be lifted in [mins] minutes.")
+ to_chat(M, "This jobban will be lifted in [fancy_jobban_duration].")
href_list["jobban2"] = 1 // lets it fall through and refresh
return 1
if("No")
diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm
index 552325d57da..37e4476d26e 100644
--- a/code/modules/client/preferences.dm
+++ b/code/modules/client/preferences.dm
@@ -949,13 +949,13 @@ GLOBAL_LIST_EMPTY(preferences_datums)
if(query_get_jobban.NextRow())
var/reason = query_get_jobban.item[1]
var/bantime = query_get_jobban.item[2]
- var/duration = query_get_jobban.item[3]
+ var/duration = text2num(query_get_jobban.item[3])
var/expiration_time = query_get_jobban.item[4]
var/admin_key = query_get_jobban.item[5]
var/text
text = "You, or another user of this computer, ([user.key]) is banned from playing [job]. The ban reason is:
[reason]
This ban was applied by [admin_key] on [bantime]"
- if(text2num(duration) > 0)
- text += ". The ban is for [duration] minutes and expires on [expiration_time] (server time)"
+ if(duration > 0)
+ text += ". The ban is for [DisplayTimeText(duration MINUTES)] and expires on [expiration_time] (server time)"
text += "."
to_chat(user, text)
qdel(query_get_jobban)