mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-19 02:54:41 +01:00
Merge pull request #2084 from Markolie/looc2
LOOC overhaul, stealthmin fixes
This commit is contained in:
@@ -553,18 +553,40 @@ var/global/nologevent = 0
|
||||
set category = "Server"
|
||||
set desc="Globally Toggles OOC"
|
||||
set name="Toggle OOC"
|
||||
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
toggle_ooc()
|
||||
log_admin("[key_name(usr)] toggled OOC.")
|
||||
message_admins("[key_name_admin(usr)] toggled OOC.", 1)
|
||||
log_and_message_admins("toggled OOC.")
|
||||
feedback_add_details("admin_verb","TOOC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/datum/admins/proc/togglelooc()
|
||||
set category = "Server"
|
||||
set desc="Globally Toggles LOOC"
|
||||
set name="Toggle LOOC"
|
||||
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
config.looc_allowed = !(config.looc_allowed)
|
||||
if (config.looc_allowed)
|
||||
world << "<B>The LOOC channel has been globally enabled!</B>"
|
||||
else
|
||||
world << "<B>The LOOC channel has been globally disabled!</B>"
|
||||
log_and_message_admins("toggled LOOC.")
|
||||
feedback_add_details("admin_verb","TLOOC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/datum/admins/proc/toggledsay()
|
||||
set category = "Server"
|
||||
set desc="Globally Toggles DSAY"
|
||||
set name="Toggle DSAY"
|
||||
dsay_allowed = !( dsay_allowed )
|
||||
if (dsay_allowed)
|
||||
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
config.dsay_allowed = !(config.dsay_allowed)
|
||||
if (config.dsay_allowed)
|
||||
world << "<B>Deadchat has been globally enabled!</B>"
|
||||
else
|
||||
world << "<B>Deadchat has been globally disabled!</B>"
|
||||
@@ -574,11 +596,14 @@ var/global/nologevent = 0
|
||||
|
||||
/datum/admins/proc/toggleoocdead()
|
||||
set category = "Server"
|
||||
set desc="Toggle dis bitch"
|
||||
set desc="Toggle Dead OOC."
|
||||
set name="Toggle Dead OOC"
|
||||
dooc_allowed = !( dooc_allowed )
|
||||
|
||||
log_admin("[key_name(usr)] toggled OOC.")
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
config.dooc_allowed = !( config.dooc_allowed )
|
||||
log_admin("[key_name(usr)] toggled Dead OOC.")
|
||||
message_admins("[key_name_admin(usr)] toggled Dead OOC.", 1)
|
||||
feedback_add_details("admin_verb","TDOOC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
@@ -49,6 +49,7 @@ var/list/admin_verbs_admin = list(
|
||||
/client/proc/toggle_hear_radio, /*toggles whether we hear the radio*/
|
||||
/client/proc/investigate_show, /*various admintools for investigation. Such as a singulo grief-log*/
|
||||
/datum/admins/proc/toggleooc, /*toggles ooc on/off for everyone*/
|
||||
/datum/admins/proc/togglelooc, /*toggles looc on/off for everyone*/
|
||||
/datum/admins/proc/toggleoocdead, /*toggles ooc on/off for everyone who is dead*/
|
||||
/datum/admins/proc/toggledsay, /*toggles dsay on/off for everyone*/
|
||||
/client/proc/game_panel, /*game panel, allows to change game-mode etc*/
|
||||
@@ -347,6 +348,25 @@ var/list/admin_verbs_mentor = list(
|
||||
holder.Secrets()
|
||||
feedback_add_details("admin_verb","S") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
return
|
||||
|
||||
/client/proc/findStealthKey(txt)
|
||||
if(txt)
|
||||
for(var/P in stealthminID)
|
||||
if(stealthminID[P] == txt)
|
||||
return P
|
||||
txt = stealthminID[ckey]
|
||||
return txt
|
||||
|
||||
/client/proc/createStealthKey()
|
||||
var/num = (rand(0,1000))
|
||||
var/i = 0
|
||||
while(i == 0)
|
||||
i = 1
|
||||
for(var/P in stealthminID)
|
||||
if(num == stealthminID[P])
|
||||
num++
|
||||
i = 0
|
||||
stealthminID["[ckey]"] = "@[num2text(num)]"
|
||||
|
||||
/client/proc/stealth()
|
||||
set category = "Admin"
|
||||
@@ -360,6 +380,7 @@ var/list/admin_verbs_mentor = list(
|
||||
if(length(new_key) >= 26)
|
||||
new_key = copytext(new_key, 1, 26)
|
||||
holder.fakekey = new_key
|
||||
createStealthKey()
|
||||
log_admin("[key_name(usr)] has turned stealth mode [holder.fakekey ? "ON" : "OFF"]")
|
||||
message_admins("[key_name_admin(usr)] has turned stealth mode [holder.fakekey ? "ON" : "OFF"]", 1)
|
||||
feedback_add_details("admin_verb","SM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -58,16 +58,26 @@
|
||||
|
||||
//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(var/client/C, var/msg, var/type="PM")
|
||||
/client/proc/cmd_admin_pm(whom, msg, type = "PM")
|
||||
if(prefs.muted & MUTE_ADMINHELP)
|
||||
src << "<font color='red'>Error: Private-Message: You are unable to use PM-s (muted).</font>"
|
||||
return
|
||||
|
||||
if(!istype(C,/client))
|
||||
if(holder) src << "<font color='red'>Error: Private-Message: Client not found.</font>"
|
||||
else adminhelp(msg) //admin we are replying to left. adminhelp instead
|
||||
var/client/C
|
||||
if(istext(whom))
|
||||
if(cmptext(copytext(whom,1,2),"@"))
|
||||
whom = findStealthKey(whom)
|
||||
C = directory[C]
|
||||
else if(istype(whom,/client))
|
||||
C = whom
|
||||
|
||||
if(!C)
|
||||
if(holder)
|
||||
src << "<span class='danger'>Error: Private-Message: Client not found.</span>"
|
||||
else
|
||||
adminhelp(msg) //admin we are replying to left. adminhelp instead
|
||||
return
|
||||
|
||||
|
||||
/*if(C && C.last_pm_recieved + config.simultaneous_pm_warning_timeout > world.time && holder)
|
||||
//send a warning to admins, but have a delay popup for mods
|
||||
if(holder.rights & R_ADMIN)
|
||||
@@ -78,12 +88,15 @@
|
||||
|
||||
//get message text, limit it's length.and clean/escape html
|
||||
if(!msg)
|
||||
msg = input(src,"Message:", "Private message to [C.key]") as text|null
|
||||
msg = input(src,"Message:", "Private message to [key_name(C, 0, 0)]") as text|null
|
||||
|
||||
if(!msg) return
|
||||
if(!msg)
|
||||
return
|
||||
if(!C)
|
||||
if(holder) src << "<font color='red'>Error: Admin-PM: Client not found.</font>"
|
||||
else adminhelp(msg) //admin we are replying to has vanished, adminhelp instead
|
||||
if(holder)
|
||||
src << "<span class='danger'>Error: Admin-PM: Client not found.</span>"
|
||||
else
|
||||
adminhelp(msg) //admin we are replying to has vanished, adminhelp instead
|
||||
return
|
||||
|
||||
if (src.handle_spam_prevention(msg,MUTE_ADMINHELP))
|
||||
@@ -92,7 +105,8 @@
|
||||
//clean the message if it's not sent by a high-rank admin
|
||||
if(!check_rights(R_SERVER|R_DEBUG,0))
|
||||
msg = sanitize(copytext(msg,1,MAX_MESSAGE_LEN))
|
||||
if(!msg) return
|
||||
if(!msg)
|
||||
return
|
||||
|
||||
var/recieve_color = "purple"
|
||||
var/send_pm_type = " "
|
||||
|
||||
@@ -35,6 +35,9 @@
|
||||
if (!msg)
|
||||
return
|
||||
|
||||
say_dead_direct("<span class='name'>[stafftype] ([src.holder.fakekey ? src.holder.fakekey : src.key])</span> says, <span class='message'>\"[msg]\"</span>")
|
||||
var/prefix = "[stafftype] ([src.key])"
|
||||
if(holder.fakekey)
|
||||
prefix = "Administrator"
|
||||
say_dead_direct("<span class='name'>[prefix]</span> says, <span class='message'>\"[msg]\"</span>")
|
||||
|
||||
feedback_add_details("admin_verb","D") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
return
|
||||
|
||||
if(!src.client.holder)
|
||||
if(!dsay_allowed)
|
||||
if(!config.dsay_allowed)
|
||||
src << "\red Deadchat is globally muted"
|
||||
return
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
|
||||
/mob/proc/say_dead(var/message)
|
||||
if(!src.client.holder)
|
||||
if(!dsay_allowed)
|
||||
if(!config.dsay_allowed)
|
||||
src << "<span class='danger'>Deadchat is globally muted.</span>"
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user