mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-17 10:03:50 +01:00
Merge remote-tracking branch 'ParadiseSS13/master' into client-data-loading
This commit is contained in:
@@ -122,7 +122,6 @@ GLOBAL_VAR_INIT(nologevent, 0)
|
||||
|
||||
if(M.ckey)
|
||||
body += "<A href='?_src_=holder;boot2=[M.UID()]'>Kick</A> | "
|
||||
body += "<A href='?_src_=holder;warn=[M.ckey]'>Warn</A> | "
|
||||
body += "<A href='?_src_=holder;newban=[M.UID()];dbbanaddckey=[M.ckey]'>Ban</A> | "
|
||||
body += "<A href='?_src_=holder;jobban2=[M.UID()];dbbanaddckey=[M.ckey]'>Jobban</A> | "
|
||||
body += "<A href='?_src_=holder;appearanceban=[M.UID()];dbbanaddckey=[M.ckey]'>Appearance Ban</A> | "
|
||||
@@ -141,14 +140,13 @@ GLOBAL_VAR_INIT(nologevent, 0)
|
||||
body += "\ <A href='?_src_=holder;sendbacktolobby=[M.UID()]'>Send back to Lobby</A> | "
|
||||
body += "\ <A href='?_src_=holder;eraseflavortext=[M.UID()]'>Erase Flavor Text</A> | "
|
||||
body += "\ <A href='?_src_=holder;userandomname=[M.UID()]'>Use Random Name</A> | "
|
||||
var/muted = M.client.prefs.muted
|
||||
body += {"<br><b>Mute: </b>
|
||||
\[<A href='?_src_=holder;mute=[M.UID()];mute_type=[MUTE_IC]'><font color='[(muted & MUTE_IC)?"red":"#6685f5"]'>IC</font></a> |
|
||||
<A href='?_src_=holder;mute=[M.UID()];mute_type=[MUTE_OOC]'><font color='[(muted & MUTE_OOC)?"red":"#6685f5"]'>OOC</font></a> |
|
||||
<A href='?_src_=holder;mute=[M.UID()];mute_type=[MUTE_PRAY]'><font color='[(muted & MUTE_PRAY)?"red":"#6685f5"]'>PRAY</font></a> |
|
||||
<A href='?_src_=holder;mute=[M.UID()];mute_type=[MUTE_ADMINHELP]'><font color='[(muted & MUTE_ADMINHELP)?"red":"#6685f5"]'>ADMINHELP</font></a> |
|
||||
<A href='?_src_=holder;mute=[M.UID()];mute_type=[MUTE_DEADCHAT]'><font color='[(muted & MUTE_DEADCHAT)?"red":"#6685f5"]'>DEADCHAT</font></a>\]
|
||||
(<A href='?_src_=holder;mute=[M.UID()];mute_type=[MUTE_ALL]'><font color='[(muted & MUTE_ALL)?"red":"#6685f5"]'>toggle all</font></a>)
|
||||
\[<A href='?_src_=holder;mute=[M.UID()];mute_type=[MUTE_IC]'><font color='[check_mute(M.client.ckey, MUTE_IC) ? "red" : "#6685f5"]'>IC</font></a> |
|
||||
<A href='?_src_=holder;mute=[M.UID()];mute_type=[MUTE_OOC]'><font color='[check_mute(M.client.ckey, MUTE_OOC) ? "red" : "#6685f5"]'>OOC</font></a> |
|
||||
<A href='?_src_=holder;mute=[M.UID()];mute_type=[MUTE_PRAY]'><font color='[check_mute(M.client.ckey, MUTE_PRAY) ? "red" : "#6685f5"]'>PRAY</font></a> |
|
||||
<A href='?_src_=holder;mute=[M.UID()];mute_type=[MUTE_ADMINHELP]'><font color='[check_mute(M.client.ckey, MUTE_ADMINHELP) ? "red" : "#6685f5"]'>ADMINHELP</font></a> |
|
||||
<A href='?_src_=holder;mute=[M.UID()];mute_type=[MUTE_DEADCHAT]'><font color='[check_mute(M.client.ckey, MUTE_DEADCHAT) ?" red" : "#6685f5"]'>DEADCHAT</font></a>]
|
||||
(<A href='?_src_=holder;mute=[M.UID()];mute_type=[MUTE_ALL]'><font color='[check_mute(M.client.ckey, MUTE_ALL) ? "red" : "#6685f5"]'>toggle all</font></a>)
|
||||
"}
|
||||
|
||||
var/jumptoeye = ""
|
||||
|
||||
@@ -492,51 +492,6 @@ GLOBAL_LIST_INIT(admin_verbs_ticket, list(
|
||||
log_admin("[key_name(usr)] has turned BB mode [holder.fakekey ? "ON" : "OFF"]")
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Big Brother Mode")
|
||||
|
||||
#define MAX_WARNS 3
|
||||
#define AUTOBANTIME 10
|
||||
|
||||
/client/proc/warn(warned_ckey)
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
if(!warned_ckey || !istext(warned_ckey)) return
|
||||
if(warned_ckey in GLOB.admin_datums)
|
||||
to_chat(usr, "<font color='red'>Error: warn(): You can't warn admins.</font>")
|
||||
return
|
||||
|
||||
var/datum/preferences/D
|
||||
var/client/C = GLOB.directory[warned_ckey]
|
||||
if(C) D = C.prefs
|
||||
else D = GLOB.preferences_datums[warned_ckey]
|
||||
|
||||
if(!D)
|
||||
to_chat(src, "<font color='red'>Error: warn(): No such ckey found.</font>")
|
||||
return
|
||||
|
||||
if(++D.warns >= MAX_WARNS) //uh ohhhh...you'reee iiiiin trouuuubble O:)
|
||||
if(C)
|
||||
message_admins("[key_name_admin(src)] has warned [key_name_admin(C)] resulting in a [AUTOBANTIME] minute ban")
|
||||
log_admin("[key_name(src)] has warned [key_name(C)] resulting in a [AUTOBANTIME] minute ban")
|
||||
to_chat(C, "<font color='red'><BIG><B>You have been autobanned due to a warning by [ckey].</B></BIG><br>This is a temporary ban, it will be removed in [AUTOBANTIME] minutes.")
|
||||
qdel(C)
|
||||
else
|
||||
message_admins("[key_name_admin(src)] has warned [warned_ckey] resulting in a [AUTOBANTIME] minute ban")
|
||||
log_admin("[key_name(src)] has warned [warned_ckey] resulting in a [AUTOBANTIME] minute ban")
|
||||
AddBan(warned_ckey, D.last_id, "Autobanning due to too many formal warnings", ckey, 1, AUTOBANTIME)
|
||||
else
|
||||
if(C)
|
||||
to_chat(C, "<font color='red'><BIG><B>You have been formally warned by an administrator.</B></BIG><br>Further warnings will result in an autoban.</font>")
|
||||
message_admins("[key_name_admin(src)] has warned [key_name_admin(C)]. They have [MAX_WARNS-D.warns] strikes remaining.")
|
||||
log_admin("[key_name(src)] has warned [key_name(C)]. They have [MAX_WARNS-D.warns] strikes remaining.")
|
||||
else
|
||||
message_admins("[key_name_admin(src)] has warned [warned_ckey] (DC). They have [MAX_WARNS-D.warns] strikes remaining.")
|
||||
log_admin("[key_name(src)] has warned [warned_ckey] (DC). They have [MAX_WARNS-D.warns] strikes remaining.")
|
||||
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Warning") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
#undef MAX_WARNS
|
||||
#undef AUTOBANTIME
|
||||
|
||||
/client/proc/drop_bomb() // Some admin dickery that can probably be done better -- TLE
|
||||
set category = "Event"
|
||||
set name = "Drop Bomb"
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
/// Associative list of people who are muted via admin mutes
|
||||
GLOBAL_LIST_EMPTY(admin_mutes_assoc)
|
||||
|
||||
/proc/check_mute(ckey, muteflag)
|
||||
if(isnull(GLOB.admin_mutes_assoc[ckey]))
|
||||
return FALSE
|
||||
|
||||
if(GLOB.admin_mutes_assoc[ckey] & muteflag)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/proc/toggle_mute(ckey, muteflag)
|
||||
if(isnull(GLOB.admin_mutes_assoc[ckey]))
|
||||
GLOB.admin_mutes_assoc[ckey] = 0
|
||||
|
||||
if(GLOB.admin_mutes_assoc[ckey] & muteflag)
|
||||
GLOB.admin_mutes_assoc[ckey] &= ~muteflag
|
||||
else
|
||||
GLOB.admin_mutes_assoc[ckey] |= muteflag
|
||||
|
||||
/proc/force_add_mute(ckey, muteflag)
|
||||
if(isnull(GLOB.admin_mutes_assoc[ckey]))
|
||||
GLOB.admin_mutes_assoc[ckey] = 0
|
||||
|
||||
GLOB.admin_mutes_assoc[ckey] |= muteflag
|
||||
|
||||
/proc/force_remove_mute(ckey, muteflag)
|
||||
if(isnull(GLOB.admin_mutes_assoc[ckey]))
|
||||
GLOB.admin_mutes_assoc[ckey] = 0
|
||||
|
||||
GLOB.admin_mutes_assoc[ckey] &= ~muteflag
|
||||
|
||||
@@ -446,9 +446,6 @@
|
||||
alert(usr, "This ban has already been lifted / does not exist.", "Error", "Ok")
|
||||
unbanpanel()
|
||||
|
||||
else if(href_list["warn"])
|
||||
usr.client.warn(href_list["warn"])
|
||||
|
||||
else if(href_list["unbane"])
|
||||
if(!check_rights(R_BAN)) return
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ GLOBAL_LIST_INIT(adminhelp_ignored_words, list("unknown", "the", "a", "an", "of"
|
||||
set name = "Adminhelp"
|
||||
|
||||
//handle muting and automuting
|
||||
if(prefs.muted & MUTE_ADMINHELP)
|
||||
if(check_mute(ckey, MUTE_ADMINHELP))
|
||||
to_chat(src, "<font color='red'>Error: Admin-PM: You cannot send adminhelps (Muted).</font>")
|
||||
return
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
//takes input from cmd_admin_pm_context, cmd_admin_pm_panel or /client/Topic and sends them a PM.
|
||||
//Fetching a message if needed. src is the sender and C is the target client
|
||||
/client/proc/cmd_admin_pm(whom, msg, type = "PM")
|
||||
if(prefs.muted & MUTE_ADMINHELP)
|
||||
if(check_mute(ckey, MUTE_ADMINHELP))
|
||||
to_chat(src, "<span class='danger'>Error: Private-Message: You are unable to use PM-s (muted).</span>")
|
||||
return
|
||||
|
||||
@@ -212,7 +212,7 @@
|
||||
return
|
||||
|
||||
/client/proc/cmd_admin_discord_pm()
|
||||
if(prefs.muted & MUTE_ADMINHELP)
|
||||
if(check_mute(ckey, MUTE_ADMINHELP))
|
||||
to_chat(src, "<span class='danger'>Error: Private-Message: You are unable to use PMs (muted).</span>")
|
||||
return
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
if(!src.mob)
|
||||
return
|
||||
|
||||
if(prefs.muted & MUTE_DEADCHAT)
|
||||
if(check_mute(ckey, MUTE_DEADCHAT))
|
||||
to_chat(src, "<span class='warning'>You cannot send DSAY messages (muted).</span>")
|
||||
return
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
return
|
||||
|
||||
if(usr.client)
|
||||
if(usr.client.prefs.muted & MUTE_PRAY)
|
||||
if(check_mute(client.ckey, MUTE_PRAY))
|
||||
to_chat(usr, "<span class='warning'>You cannot pray (muted).</span>")
|
||||
return
|
||||
if(client.handle_spam_prevention(msg, MUTE_PRAY, OOC_COOLDOWN))
|
||||
|
||||
@@ -230,19 +230,19 @@
|
||||
|
||||
if(automute)
|
||||
muteunmute = "auto-muted"
|
||||
M.client.prefs.muted |= mute_type
|
||||
force_add_mute(M.client.ckey, mute_type)
|
||||
log_admin("SPAM AUTOMUTE: [muteunmute] [key_name(M)] from [mute_string]")
|
||||
message_admins("SPAM AUTOMUTE: [muteunmute] [key_name_admin(M)] from [mute_string].", 1)
|
||||
to_chat(M, "You have been [muteunmute] from [mute_string] by the SPAM AUTOMUTE system. Contact an admin.")
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Automute") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
return
|
||||
|
||||
if(M.client.prefs.muted & mute_type)
|
||||
muteunmute = "unmuted"
|
||||
M.client.prefs.muted &= ~mute_type
|
||||
else
|
||||
toggle_mute(M.client.ckey, mute_type)
|
||||
|
||||
if(check_mute(M.client.ckey, mute_type))
|
||||
muteunmute = "muted"
|
||||
M.client.prefs.muted |= mute_type
|
||||
else
|
||||
muteunmute = "unmuted"
|
||||
|
||||
log_admin("[key_name(usr)] has [muteunmute] [key_name(M)] from [mute_string]")
|
||||
message_admins("[key_name_admin(usr)] has [muteunmute] [key_name_admin(M)] from [mute_string].", 1)
|
||||
@@ -608,7 +608,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
"Custom" = "Cryptic Message")
|
||||
|
||||
var/list/MsgSound = list("Beep" = 'sound/misc/notice2.ogg',
|
||||
"Enemy Communications Intercepted" = 'sound/AI/intercept2.ogg',
|
||||
"Enemy Communications Intercepted" = 'sound/AI/intercept.ogg',
|
||||
"New Command Report Created" = 'sound/AI/commandreport.ogg')
|
||||
|
||||
var/type = input(usr, "Pick a type of report to send", "Report Type", "") as anything in MsgType
|
||||
|
||||
Reference in New Issue
Block a user