Replace all BYOND text macros

This commit is contained in:
Markolie
2017-02-21 15:41:37 +01:00
parent fb1cef8029
commit 6982014a6e
286 changed files with 1303 additions and 1311 deletions
+7 -7
View File
@@ -127,7 +127,7 @@ datum/admins/proc/DB_ban_record(var/bantype, var/mob/banned_mob, var/duration =
var/sql = "INSERT INTO [format_table_name("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, "\blue Ban saved to database.")
to_chat(usr, "<span class='notice'>Ban saved to database.</span>")
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)
if(announceinirc)
@@ -201,17 +201,17 @@ datum/admins/proc/DB_ban_unban(var/ckey, var/bantype, var/job = "")
ban_number++;
if(ban_number == 0)
to_chat(usr, "\red 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, "<span class='warning'>Database update failed due to no bans fitting the search criteria. If this is not a legacy ban you should contact the database admin.</span>")
return
if(ban_number > 1)
to_chat(usr, "\red 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, "<span class='warning'>Database update failed due to multiple bans fitting the search criteria. Note down the ckey, job and current time and contact the database admin.</span>")
return
if(istext(ban_id))
ban_id = text2num(ban_id)
if(!isnum(ban_id))
to_chat(usr, "\red Database update failed due to a ban ID mismatch. Contact the database admin.")
to_chat(usr, "<span class='warning'>Database update failed due to a ban ID mismatch. Contact the database admin.</span>")
return
DB_ban_unban_by_id(ban_id)
@@ -302,11 +302,11 @@ datum/admins/proc/DB_ban_unban_by_id(var/id)
ban_number++;
if(ban_number == 0)
to_chat(usr, "\red Database update failed due to a ban id not being present in the database.")
to_chat(usr, "<span class='warning'>Database update failed due to a ban id not being present in the database.</span>")
return
if(ban_number > 1)
to_chat(usr, "\red Database update failed due to multiple bans having the same ID. Contact the database admin.")
to_chat(usr, "<span class='warning'>Database update failed due to multiple bans having the same ID. Contact the database admin.</span>")
return
if(!src.owner || !istype(src.owner, /client))
@@ -343,7 +343,7 @@ datum/admins/proc/DB_ban_unban_by_id(var/id)
establish_db_connection()
if(!dbcon.IsConnected())
to_chat(usr, "\red Failed to establish database connection")
to_chat(usr, "<span class='warning'>Failed to establish database connection</span>")
return
var/output = "<div align='center'><table width='90%'><tr>"