mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
Merge remote-tracking branch 'upstream/dev-freeze' into dev
Conflicts: code/modules/admin/DB ban/functions.dm
This commit is contained in:
@@ -1347,3 +1347,7 @@ var/mob/dview/dview_mob = new
|
||||
dead_mob_list -= src
|
||||
else
|
||||
living_mob_list -= src
|
||||
|
||||
// call to generate a stack trace and print to runtime logs
|
||||
/proc/crash_with(msg)
|
||||
CRASH(msg)
|
||||
|
||||
@@ -146,6 +146,7 @@ world/loop_checks = 0
|
||||
return
|
||||
if(!istype(A))
|
||||
warning("qdel() passed object of type [A.type]. qdel() can only handle /datum types.")
|
||||
crash_with("qdel() passed object of type [A.type]. qdel() can only handle /datum types.")
|
||||
del(A)
|
||||
if(garbage_collector)
|
||||
garbage_collector.dels++
|
||||
|
||||
@@ -47,7 +47,7 @@ var/datum/antagonist/deathsquad/deathsquad
|
||||
player.equip_to_slot_or_del(new /obj/item/weapon/plastique(player), slot_l_store)
|
||||
player.equip_to_slot_or_del(new /obj/item/weapon/gun/projectile/revolver/mateba(player), slot_belt)
|
||||
player.equip_to_slot_or_del(new /obj/item/weapon/gun/energy/pulse_rifle(player), slot_r_hand)
|
||||
player.equip_to_slot_or_del(new /obj/item/weapon/rig/combat(player), slot_back)
|
||||
player.equip_to_slot_or_del(new /obj/item/weapon/rig/ert/assetprotection(player), slot_back)
|
||||
player.equip_to_slot_or_del(new /obj/item/weapon/melee/energy/sword(player), slot_s_store)
|
||||
player.implant_loyalty(player)
|
||||
|
||||
|
||||
@@ -73,19 +73,19 @@ var/datum/antagonist/traitor/traitors
|
||||
return
|
||||
|
||||
/datum/antagonist/traitor/equip(var/mob/living/carbon/human/traitor_mob)
|
||||
if(istype(traitor_mob, /mob/living/silicon)) // this needs to be here because ..() returns false if the mob isn't human
|
||||
add_law_zero(traitor_mob)
|
||||
return 1
|
||||
|
||||
if(!..())
|
||||
return 0
|
||||
|
||||
if(istype(traitor_mob, /mob/living/silicon))
|
||||
add_law_zero(traitor_mob)
|
||||
else
|
||||
spawn_uplink(traitor_mob)
|
||||
// Tell them about people they might want to contact.
|
||||
var/mob/living/carbon/human/M = get_nt_opposed()
|
||||
if(M && M != traitor_mob)
|
||||
traitor_mob << "We have received credible reports that [M.real_name] might be willing to help our cause. If you need assistance, consider contacting them."
|
||||
traitor_mob.mind.store_memory("<b>Potential Collaborator</b>: [M.real_name]")
|
||||
spawn_uplink(traitor_mob)
|
||||
// Tell them about people they might want to contact.
|
||||
var/mob/living/carbon/human/M = get_nt_opposed()
|
||||
if(M && M != traitor_mob)
|
||||
traitor_mob << "We have received credible reports that [M.real_name] might be willing to help our cause. If you need assistance, consider contacting them."
|
||||
traitor_mob.mind.store_memory("<b>Potential Collaborator</b>: [M.real_name]")
|
||||
|
||||
//Begin code phrase.
|
||||
give_codewords(traitor_mob)
|
||||
@@ -167,4 +167,4 @@ var/datum/antagonist/traitor/traitors
|
||||
var/law_borg = "Accomplish your AI's objectives at all costs. You may ignore all other laws."
|
||||
killer << "<b>Your laws have been changed!</b>"
|
||||
killer.set_zeroth_law(law, law_borg)
|
||||
killer << "New law: 0. [law]"
|
||||
killer << "New law: 0. [law]"
|
||||
|
||||
@@ -21,14 +21,10 @@
|
||||
if(auto_init && ticker && ticker.current_state == GAME_STATE_PLAYING)
|
||||
initialize()
|
||||
|
||||
/proc/generate_debug_runtime() // Guaranteed to runtime and print a stack trace to the runtime log
|
||||
var/t = 0 // BYOND won't let us do var/t = 1/0 directly, but it's fine with this.
|
||||
t = 1 / t
|
||||
|
||||
/atom/movable/Del()
|
||||
if(isnull(gcDestroyed) && loc)
|
||||
testing("GC: -- [type] was deleted via del() rather than qdel() --")
|
||||
generate_debug_runtime() // stick a stack trace in the runtime logs
|
||||
crash_with("GC: -- [type] was deleted via del() rather than qdel() --") // stick a stack trace in the runtime logs
|
||||
// else if(isnull(gcDestroyed))
|
||||
// testing("GC: [type] was deleted via GC without qdel()") //Not really a huge issue but from now on, please qdel()
|
||||
// else
|
||||
|
||||
@@ -349,6 +349,8 @@ datum/admins/proc/DB_ban_unban_by_id(var/id)
|
||||
var/bdcolor = "#ffdddd" //banned dark
|
||||
var/ulcolor = "#eeffee" //unbanned light
|
||||
var/udcolor = "#ddffdd" //unbanned dark
|
||||
var/alcolor = "#eeeeff" // auto-unbanned light
|
||||
var/adcolor = "#ddddff" // auto-unbanned dark
|
||||
|
||||
output += "<table width='90%' bgcolor='#e3e3e3' cellpadding='5' cellspacing='0' align='center'>"
|
||||
output += "<tr>"
|
||||
@@ -400,6 +402,8 @@ datum/admins/proc/DB_ban_unban_by_id(var/id)
|
||||
var/DBQuery/select_query = dbcon.NewQuery("SELECT id, bantime, bantype, reason, job, duration, expiration_time, ckey, a_ckey, unbanned, unbanned_ckey, unbanned_datetime, edits, ip, computerid FROM erro_ban WHERE 1 [playersearch] [adminsearch] [ipsearch] [cidsearch] [bantypesearch] ORDER BY bantime DESC LIMIT 100")
|
||||
select_query.Execute()
|
||||
|
||||
var/now = time2text(world.realtime, "YYYY-MM-DD hh:mm:ss") // MUST BE the same format as SQL gives us the dates in, and MUST be least to most specific (i.e. year, month, day not day, month, year)
|
||||
|
||||
while(select_query.NextRow())
|
||||
var/banid = select_query.item[1]
|
||||
var/bantime = select_query.item[2]
|
||||
@@ -417,18 +421,24 @@ datum/admins/proc/DB_ban_unban_by_id(var/id)
|
||||
var/ip = select_query.item[14]
|
||||
var/cid = select_query.item[15]
|
||||
|
||||
// true if this ban has expired
|
||||
var/auto = (bantype in list("TEMPBAN", "JOB_TEMPBAN")) && now > expiration // oh how I love ISO 8601 (ish) date strings
|
||||
|
||||
var/lcolor = blcolor
|
||||
var/dcolor = bdcolor
|
||||
if(unbanned)
|
||||
lcolor = ulcolor
|
||||
dcolor = udcolor
|
||||
else if(auto)
|
||||
lcolor = alcolor
|
||||
dcolor = adcolor
|
||||
|
||||
var/typedesc =""
|
||||
switch(bantype)
|
||||
if("PERMABAN")
|
||||
typedesc = "<font color='red'><b>PERMABAN</b></font>"
|
||||
if("TEMPBAN")
|
||||
typedesc = "<b>TEMPBAN</b><br><font size='2'>([duration] minutes [(unbanned) ? "" : "(<a href=\"byond://?src=\ref[src];dbbanedit=duration;dbbanid=[banid]\">Edit</a>))"]<br>Expires [expiration]</font>"
|
||||
typedesc = "<b>TEMPBAN</b><br><font size='2'>([duration] minutes) [(unbanned || auto) ? "" : "(<a href=\"byond://?src=\ref[src];dbbanedit=duration;dbbanid=[banid]\">Edit</a>)"]<br>Expires [expiration]</font>"
|
||||
if("JOB_PERMABAN")
|
||||
typedesc = "<b>JOBBAN</b><br><font size='2'>([job])</font>"
|
||||
if("JOB_TEMPBAN")
|
||||
@@ -439,14 +449,14 @@ datum/admins/proc/DB_ban_unban_by_id(var/id)
|
||||
output += "<td align='center'><b>[ckey]</b></td>"
|
||||
output += "<td align='center'>[bantime]</td>"
|
||||
output += "<td align='center'><b>[ackey]</b></td>"
|
||||
output += "<td align='center'>[(unbanned) ? "" : "<b><a href=\"byond://?src=\ref[src];dbbanedit=unban;dbbanid=[banid]\">Unban</a></b>"]</td>"
|
||||
output += "<td align='center'>[(unbanned || auto) ? "" : "<b><a href=\"byond://?src=\ref[src];dbbanedit=unban;dbbanid=[banid]\">Unban</a></b>"]</td>"
|
||||
output += "</tr>"
|
||||
output += "<tr bgcolor='[dcolor]'>"
|
||||
output += "<td align='center' colspan='2' bgcolor=''><b>IP:</b> [ip]</td>"
|
||||
output += "<td align='center' colspan='3' bgcolor=''><b>CIP:</b> [cid]</td>"
|
||||
output += "</tr>"
|
||||
output += "<tr bgcolor='[lcolor]'>"
|
||||
output += "<td align='center' colspan='5'><b>Reason: [(unbanned) ? "" : "(<a href=\"byond://?src=\ref[src];dbbanedit=reason;dbbanid=[banid]\">Edit</a>)"]</b> <cite>\"[reason]\"</cite></td>"
|
||||
output += "<td align='center' colspan='5'><b>Reason: [(unbanned || auto) ? "" : "(<a href=\"byond://?src=\ref[src];dbbanedit=reason;dbbanid=[banid]\">Edit</a>)"]</b> <cite>\"[reason]\"</cite></td>"
|
||||
output += "</tr>"
|
||||
if(edits)
|
||||
output += "<tr bgcolor='[dcolor]'>"
|
||||
@@ -459,10 +469,14 @@ datum/admins/proc/DB_ban_unban_by_id(var/id)
|
||||
output += "<tr bgcolor='[dcolor]'>"
|
||||
output += "<td align='center' colspan='5' bgcolor=''><b>UNBANNED by admin [unbanckey] on [unbantime]</b></td>"
|
||||
output += "</tr>"
|
||||
else if(auto)
|
||||
output += "<tr bgcolor='[dcolor]'>"
|
||||
output += "<td align='center' colspan='5' bgcolor=''><b>EXPIRED at [expiration]</b></td>"
|
||||
output += "</tr>"
|
||||
output += "<tr>"
|
||||
output += "<td colspan='5' bgcolor='white'> </td>"
|
||||
output += "</tr>"
|
||||
|
||||
output += "</table></div>"
|
||||
|
||||
usr << browse(output,"window=lookupbans;size=900x700")
|
||||
usr << browse(output,"window=lookupbans;size=900x700")
|
||||
|
||||
@@ -106,7 +106,7 @@ datum/admins/proc/notes_gethtml(var/ckey)
|
||||
message_admins("\blue [key_name_admin(user)] has edited [key]'s notes.")
|
||||
log_admin("[key_name(user)] has edited [key]'s notes.")
|
||||
|
||||
qdel(info)
|
||||
del(info) // savefile, so NOT qdel
|
||||
|
||||
//Updating list of keys with notes on them
|
||||
var/savefile/note_list = new("data/player_notes.sav")
|
||||
@@ -115,7 +115,7 @@ datum/admins/proc/notes_gethtml(var/ckey)
|
||||
if(!note_keys) note_keys = list()
|
||||
if(!note_keys.Find(key)) note_keys += key
|
||||
note_list << note_keys
|
||||
qdel(note_list)
|
||||
del(note_list) // savefile, so NOT qdel
|
||||
|
||||
|
||||
/proc/notes_del(var/key, var/index)
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
banreason = "[banreason] (CUSTOM CID)"
|
||||
else
|
||||
message_admins("Ban process: A mob matching [playermob.ckey] was found at location [playermob.x], [playermob.y], [playermob.z]. Custom ip and computer id fields replaced with the ip and computer id from the located mob")
|
||||
notes_add(playermob.ckey,banreason,usr)
|
||||
notes_add(banckey,banreason,usr)
|
||||
|
||||
DB_ban_record(bantype, playermob, banduration, banreason, banjob, null, banckey, banip, bancid )
|
||||
|
||||
|
||||
Reference in New Issue
Block a user