mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 14:39:58 +01:00
Fixes
Appearance_PERMABAN type removed. now a jobban Added needed updating to the sql changelog
This commit is contained in:
@@ -36,10 +36,6 @@
|
||||
if(BANTYPE_JOB_TEMP)
|
||||
bantype_str = "JOB_TEMPBAN"
|
||||
bantype_pass = 1
|
||||
if(BANTYPE_APPEARANCE)
|
||||
bantype_str = "APPEARANCE_PERMABAN"
|
||||
duration = -1
|
||||
bantype_pass = 1
|
||||
if(BANTYPE_ADMIN_PERMA)
|
||||
bantype_str = "ADMIN_PERMABAN"
|
||||
duration = -1
|
||||
@@ -160,9 +156,6 @@
|
||||
if(BANTYPE_JOB_TEMP)
|
||||
bantype_str = "JOB_TEMPBAN"
|
||||
bantype_pass = 1
|
||||
if(BANTYPE_APPEARANCE)
|
||||
bantype_str = "APPEARANCE_PERMABAN"
|
||||
bantype_pass = 1
|
||||
if(BANTYPE_ADMIN_PERMA)
|
||||
bantype_str = "ADMIN_PERMABAN"
|
||||
bantype_pass = 1
|
||||
@@ -361,7 +354,6 @@
|
||||
output += "<option value='[BANTYPE_TEMP]'>TEMPBAN</option>"
|
||||
output += "<option value='[BANTYPE_JOB_PERMA]'>JOB PERMABAN</option>"
|
||||
output += "<option value='[BANTYPE_JOB_TEMP]'>JOB TEMPBAN</option>"
|
||||
output += "<option value='[BANTYPE_APPEARANCE]'>IDENTITY BAN</option>"
|
||||
output += "<option value='[BANTYPE_ADMIN_PERMA]'>ADMIN PERMABAN</option>"
|
||||
output += "<option value='[BANTYPE_ADMIN_TEMP]'>ADMIN TEMPBAN</option>"
|
||||
output += "</select></td>"
|
||||
@@ -453,8 +445,6 @@
|
||||
typedesc = "<b>JOBBAN</b><br><font size='2'>([job])"
|
||||
if("JOB_TEMPBAN")
|
||||
typedesc = "<b>TEMP JOBBAN</b><br><font size='2'>([job])<br>([duration] minutes [(unbanned) ? "" : "(<a href=\"byond://?src=\ref[src];dbbanedit=duration;dbbanid=[banid]\">Edit</a>))"]<br>Expires [expiration]"
|
||||
if("APPEARANCE_PERMABAN")
|
||||
typedesc = "<b>IDENTITY PERMABAN</b>"
|
||||
if("ADMIN_PERMABAN")
|
||||
typedesc = "<b>ADMIN PERMABAN</b>"
|
||||
if("ADMIN_TEMPBAN")
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
//Code to update legacy appearance bans to jobbans
|
||||
|
||||
/proc/appearance_loadbanfile()
|
||||
if(config.ban_legacy_system)
|
||||
return
|
||||
else
|
||||
if(!establish_db_connection())
|
||||
world.log << "Database connection failed."
|
||||
diary << "Database connection failed."
|
||||
config.ban_legacy_system = 1
|
||||
return
|
||||
|
||||
//appearance bans
|
||||
var/DBQuery/query = dbcon.NewQuery("SELECT ckey FROM [format_table_name("ban")] WHERE bantype = 'APPEARANCE_PERMABAN' AND NOT unbanned = 1")
|
||||
query.Execute()
|
||||
|
||||
while(query.NextRow())
|
||||
var/ckeyb = query.item[1]
|
||||
|
||||
var/datum/admins/db = new()
|
||||
db.DB_ban_unban(ckeyb, BANTYPE_APPEARANCE)
|
||||
|
||||
var/mob/playermob
|
||||
var/exist = 0
|
||||
for(var/mob/M in player_list)
|
||||
if(M.ckey == ckeyb)
|
||||
playermob = M
|
||||
exist = 1
|
||||
break
|
||||
|
||||
if(!exist)
|
||||
playermob.ckey = ckeyb
|
||||
|
||||
db.DB_ban_record(BANTYPE_JOB_PERMA, playermob, -1, "Legacy", "Appearance")
|
||||
@@ -203,12 +203,6 @@
|
||||
if(!banckey || !banreason || !banjob || !banduration)
|
||||
usr << "Not enough parameters (Requires ckey, reason and job)."
|
||||
return
|
||||
if(BANTYPE_APPEARANCE)
|
||||
if(!banckey || !banreason)
|
||||
usr << "Not enough parameters (Requires ckey and reason)."
|
||||
return
|
||||
banduration = null
|
||||
banjob = null
|
||||
if(BANTYPE_ADMIN_PERMA)
|
||||
if(!banckey || !banreason)
|
||||
usr << "Not enough parameters (Requires ckey and reason)."
|
||||
|
||||
Reference in New Issue
Block a user