mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 03:02:54 +00:00
Macro Replacements. (#3574)
* A preface to my madness Travis failed one of my PR's because I copied old code that used /red /blue /green. Because of this, I am going to find and replace every instance of it that I find. Also this is a test commit to make sure I'm comitting to the correct branch. * /blue /green /red replacements Dear god. A slow and painful death from acid is more fun than this. I wouldn't wish this torture on my worst enemy. And this is only the beginning * Replace part 2. Time to fix the human error. * Fixes mismatches * Sets macro count to 220 One above the current number of macros in the code. * Fixes last of the mismatches. * Removes spaces, replaces \black Removes spaces Replaces \black in a few areas where seen Replaces \bold with <B> </B> where seen * Updating macro count again * More fixes! * Issues fixed! For real this time! I swear! * Fixing all the merge conflict files.
This commit is contained in:
@@ -82,7 +82,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()
|
||||
usr << "\blue Ban saved to database."
|
||||
usr << "<font color='blue'>Ban saved to database.</font>"
|
||||
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)
|
||||
|
||||
|
||||
@@ -136,17 +136,17 @@ datum/admins/proc/DB_ban_unban(var/ckey, var/bantype, var/job = "")
|
||||
ban_number++;
|
||||
|
||||
if(ban_number == 0)
|
||||
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."
|
||||
usr << "<font color='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.</font>"
|
||||
return
|
||||
|
||||
if(ban_number > 1)
|
||||
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."
|
||||
usr << "<font color='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.</font>"
|
||||
return
|
||||
|
||||
if(istext(ban_id))
|
||||
ban_id = text2num(ban_id)
|
||||
if(!isnum(ban_id))
|
||||
usr << "\red Database update failed due to a ban ID mismatch. Contact the database admin."
|
||||
usr << "<font color='red'>Database update failed due to a ban ID mismatch. Contact the database admin.</font>"
|
||||
return
|
||||
|
||||
DB_ban_unban_by_id(ban_id)
|
||||
@@ -231,11 +231,11 @@ datum/admins/proc/DB_ban_unban_by_id(var/id)
|
||||
ban_number++;
|
||||
|
||||
if(ban_number == 0)
|
||||
usr << "\red Database update failed due to a ban id not being present in the database."
|
||||
usr << "<font color='red'>Database update failed due to a ban id not being present in the database.</font>"
|
||||
return
|
||||
|
||||
if(ban_number > 1)
|
||||
usr << "\red Database update failed due to multiple bans having the same ID. Contact the database admin."
|
||||
usr << "<font color='red'>Database update failed due to multiple bans having the same ID. Contact the database admin.</font>"
|
||||
return
|
||||
|
||||
if(!src.owner || !istype(src.owner, /client))
|
||||
@@ -271,7 +271,7 @@ datum/admins/proc/DB_ban_unban_by_id(var/id)
|
||||
|
||||
establish_db_connection()
|
||||
if(!dbcon.IsConnected())
|
||||
usr << "\red Failed to establish database connection"
|
||||
usr << "<font color='red'>Failed to establish database connection</font>"
|
||||
return
|
||||
|
||||
var/output = "<div align='center'><table width='90%'><tr>"
|
||||
|
||||
Reference in New Issue
Block a user