This commit is contained in:
izac112
2020-07-25 15:22:42 +02:00
533 changed files with 50803 additions and 14888 deletions
+14
View File
@@ -933,6 +933,20 @@ var/datum/announcement/minor/admin_min_announcer = new
world.update_status()
feedback_add_details("admin_verb","TR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/datum/admins/proc/togglepersistence()
set category = "Server"
set desc="Whether persistent data will be saved from now on."
set name="Toggle Persistent Data"
config.persistence_enabled = !(config.persistence_enabled)
if(config.persistence_enabled)
to_world("<B>Persistence is now enabled..</B>")
else
to_world("<B>Persistence is no longer enabled.</B>")
message_admins("<font color='blue'>[key_name_admin(usr)] toggled persistence to [config.persistence_enabled ? "On" : "Off"].</font>", 1)
log_admin("[key_name(usr)] toggled persistence to [config.persistence_enabled ? "On" : "Off"].")
world.update_status()
feedback_add_details("admin_verb","TPD") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/datum/admins/proc/toggle_aliens()
set category = "Server"
set desc="Toggle alien mobs"
+2
View File
@@ -166,6 +166,7 @@ var/list/admin_verbs_server = list(
/datum/admins/proc/restart,
/datum/admins/proc/delay,
/datum/admins/proc/toggleaban,
/datum/admins/proc/togglepersistence,
/client/proc/cmd_mod_say,
/client/proc/toggle_log_hrefs,
/datum/admins/proc/immreboot,
@@ -354,6 +355,7 @@ var/list/admin_verbs_mod = list(
/client/proc/allow_character_respawn, // Allows a ghost to respawn ,
/datum/admins/proc/sendFax,
/client/proc/getserverlog, //allows us to fetch server logs (diary) for other days,
/datum/admins/proc/view_persistent_data,
/datum/admins/proc/view_txt_log, //shows the server log (diary) for today,
/datum/admins/proc/view_atk_log //shows the server combat-log, doesn't do anything presently,
)
+12 -8
View File
@@ -26,14 +26,18 @@ var/jobban_keylist[0] //to store the keys & ranks
if(config.usewhitelist && !check_whitelist(M))
return "Whitelisted Job"
for (var/s in jobban_keylist)
if( findtext(s,"[M.ckey] - [rank]") == 1 )
var/startpos = findtext(s, "## ")+3
if(startpos && startpos<length(s))
var/text = copytext(s, startpos, 0)
if(text)
return text
return "Reason Unspecified"
return ckey_is_jobbanned(M.ckey, rank)
return 0
/proc/ckey_is_jobbanned(var/check_key, var/rank)
for(var/s in jobban_keylist)
if(findtext(s,"[check_key] - [rank]") == 1 )
var/startpos = findtext(s, "## ")+3
if(startpos && startpos<length(s))
var/text = copytext(s, startpos, 0)
if(text)
return text
return "Reason Unspecified"
return 0
/*
+8
View File
@@ -119,3 +119,11 @@ NOTE: It checks usr by default. Supply the "user" argument if you wish to check
holder.disassociate()
//qdel(holder)
return 1
//This proc checks whether subject has at least ONE of the rights specified in rights_required.
/proc/check_rights_for(client/subject, rights_required)
if(subject && subject.holder)
if(rights_required && !(rights_required & subject.holder.rights))
return 0
return 1
return 0
+6
View File
@@ -0,0 +1,6 @@
/datum/admins/proc/view_persistent_data()
set category = "Admin"
set name = "View Persistent Data"
set desc = "Shows a list of persistent data for this round. Allows modification by admins."
SSpersistence.show_info(usr)
+10 -10
View File
@@ -614,15 +614,15 @@
jobs += "</tr></table>"
//Other races (BLUE, because I have no idea what other color to make this)
jobs += "<table cellpadding='1' cellspacing='0' width='100%'>"
jobs += "<tr bgcolor='ccccff'><th colspan='1'>Other Races</th></tr><tr align='center'>"
if(jobban_isbanned(M, "Dionaea"))
jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=Dionaea;jobban4=\ref[M]'><font color=red>Dionaea</font></a></td>"
else
jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=Dionaea;jobban4=\ref[M]'>Dionaea</a></td>"
jobs += "</tr></table>"
//Other races (Blue) ... And also graffiti.
var/list/misc_roles = list("Dionaea", "Graffiti")
jobs += "<tr bgcolor='ccccff'><th colspan='[LAZYLEN(misc_roles)]'>Other Roles</th></tr><tr align='center'>"
for(var/entry in misc_roles)
if(jobban_isbanned(M, entry))
jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=[entry];jobban4=\ref[M]'><font color=red>[entry]</font></a></td>"
else
jobs += "<td width='20%'><a href='?src=\ref[src];jobban3=[entry];jobban4=\ref[M]'>[entry]</a></td>"
jobs += "</tr></table>"
body = "<body>[jobs]</body>"
dat = "<tt>[header][body]</tt>"
usr << browse(dat, "window=jobban2;size=800x490")
@@ -726,7 +726,7 @@
switch(alert("Temporary Ban?",,"Yes","No", "Cancel"))
if("Yes")
if(!check_rights(R_MOD,0) && !check_rights(R_BAN, 0))
to_chat(usr, "<span class='filter_adminlog warning'> You Cannot issue temporary job-bans!</span>")
to_chat(usr, "<span class='filter_adminlog warning'> You cannot issue temporary job-bans!</span>")
return
if(config.ban_legacy_system)
to_chat(usr, "<span class='filter_adminlog warning'>Your server is using the legacy banning system, which does not support temporary job bans. Consider upgrading. Aborting ban.</span>")