mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-09 16:14:13 +00:00
var/fakekey; var/ooccolor; var/sound_adminhelp moved from /client to /datum/admins. These settings will now persist through a round even through logouts.
var/stealth merged into var/fakekey as it was superfluous. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4753 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -516,7 +516,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
else
|
||||
linked = 0
|
||||
|
||||
if (the_client && the_client.holder && the_client.stealth && !include_name)
|
||||
if (the_client && the_client.holder && the_client.holder.fakekey && !include_name)
|
||||
text += "Administrator"
|
||||
else
|
||||
text += "[the_key]"
|
||||
|
||||
@@ -44,12 +44,15 @@
|
||||
|
||||
for (var/client/C)
|
||||
if(C.listen_ooc)
|
||||
if (src.client.holder && (!src.client.stealth || C.holder))
|
||||
if (src.client.holder.rank == "Admin Observer")
|
||||
C << "<span class='adminobserverooc'><span class='prefix'>OOC:</span> <EM>[src.key][src.client.stealth ? "/([src.client.fakekey])" : ""]:</EM> <span class='message'>[msg]</span></span>"
|
||||
else if (src.client.holder.level >= 5)
|
||||
C << "<font color=[src.client.ooccolor]><b><span class='prefix'>OOC:</span> <EM>[src.key][src.client.stealth ? "/([src.client.fakekey])" : ""]:</EM> <span class='message'>[msg]</span></b></font>"
|
||||
if (src.client.holder)
|
||||
if(!src.client.holder.fakekey || C.holder)
|
||||
if (src.client.holder.rank == "Admin Observer")
|
||||
C << "<span class='adminobserverooc'><span class='prefix'>OOC:</span> <EM>[src.key][src.client.holder.fakekey ? "/([src.client.holder.fakekey])" : ""]:</EM> <span class='message'>[msg]</span></span>"
|
||||
else if (src.client.holder.level >= 5)
|
||||
C << "<font color=[src.client.holder.ooccolor]><b><span class='prefix'>OOC:</span> <EM>[src.key][src.client.holder.fakekey ? "/([src.client.holder.fakekey])" : ""]:</EM> <span class='message'>[msg]</span></b></font>"
|
||||
else
|
||||
C << "<span class='adminooc'><span class='prefix'>OOC:</span> <EM>[src.key][src.client.holder.fakekey ? "/([src.client.holder.fakekey])" : ""]:</EM> <span class='message'>[msg]</span></span>"
|
||||
else
|
||||
C << "<span class='adminooc'><span class='prefix'>OOC:</span> <EM>[src.key][src.client.stealth ? "/([src.client.fakekey])" : ""]:</EM> <span class='message'>[msg]</span></span>"
|
||||
C << "<span class='ooc'><span class='prefix'>OOC:</span> <EM>[src.client.holder.fakekey ? src.client.holder.fakekey : src.key]:</EM> <span class='message'>[msg]</span></span>"
|
||||
else
|
||||
C << "<span class='ooc'><span class='prefix'>OOC:</span> <EM>[src.client.stealth ? src.client.fakekey : src.key]:</EM> <span class='message'>[msg]</span></span>"
|
||||
C << "<span class='ooc'><span class='prefix'>OOC:</span> <EM>[src.key]:</EM> <span class='message'>[msg]</span></span>"
|
||||
|
||||
@@ -26,13 +26,11 @@ proc/get_all_admin_clients()
|
||||
var/list/peeps = list()
|
||||
|
||||
for (var/client/C in client_list)
|
||||
var/entry = ""
|
||||
if (C.stealth && !usr.client.holder)
|
||||
entry += "\t[C.fakekey]"
|
||||
else
|
||||
entry += "\t[C.key][C.stealth ? " <i>(as [C.fakekey])</i>" : ""]"
|
||||
|
||||
var/entry = "\t"
|
||||
if(usr.client.holder)
|
||||
entry += "[C.key]"
|
||||
if(C.holder && C.holder.fakekey)
|
||||
entry += " <i>(as [C.holder.fakekey])</i>"
|
||||
var/mob/M = C.mob
|
||||
entry += " - Playing as [M.real_name]"
|
||||
switch(M.stat)
|
||||
@@ -50,6 +48,11 @@ proc/get_all_admin_clients()
|
||||
if(is_special_character(C.mob))
|
||||
entry += " - <b><font color='red'>Antagonist</font></b>"
|
||||
entry += " (<A HREF='?src=\ref[src.client.holder];adminmoreinfo=\ref[M]'>?</A>)"
|
||||
else
|
||||
if(C.holder && C.holder.fakekey)
|
||||
entry += "[C.holder.fakekey]"
|
||||
else
|
||||
entry += "[C.key]"
|
||||
|
||||
peeps += entry
|
||||
|
||||
@@ -73,10 +76,10 @@ proc/get_all_admin_clients()
|
||||
if(C.inactivity > AFK_THRESHOLD ) //When I made this, the AFK_THRESHOLD was 3000ds = 300s = 5m, see setup.dm for the new one.
|
||||
afk = 1
|
||||
if(isobserver(C.mob))
|
||||
usr << "[C] is a [C.holder.rank][C.stealth ? " <i>(as [C.fakekey])</i>" : ""] - Observing [afk ? "(AFK)" : ""]"
|
||||
usr << "\t[C] is a [C.holder.rank][C.holder.fakekey ? " <i>(as [C.holder.fakekey])</i>" : ""] - Observing [afk ? "(AFK)" : ""]"
|
||||
else if(istype(C.mob,/mob/new_player))
|
||||
usr << "[C] is a [C.holder.rank][C.stealth ? " <i>(as [C.fakekey])</i>" : ""] - Has not entered [afk ? "(AFK)" : ""]"
|
||||
usr << "\t[C] is a [C.holder.rank][C.holder.fakekey ? " <i>(as [C.holder.fakekey])</i>" : ""] - Has not entered [afk ? "(AFK)" : ""]"
|
||||
else if(istype(C.mob,/mob/living))
|
||||
usr << "[C] is a [C.holder.rank][C.stealth ? " <i>(as [C.fakekey])</i>" : ""] - Playing [afk ? "(AFK)" : ""]"
|
||||
else if(!C.stealth)
|
||||
usr << "\t[C] is a [C.holder.rank]"
|
||||
usr << "\t[C] is a [C.holder.rank][C.holder.fakekey ? " <i>(as [C.holder.fakekey])</i>" : ""] - Playing [afk ? "(AFK)" : ""]"
|
||||
else if(!C.holder.fakekey)
|
||||
usr << "\t[C] is a [C.holder.rank]"
|
||||
|
||||
@@ -543,10 +543,10 @@ var/global/floorIsLava = 0
|
||||
if(confirm == "Cancel")
|
||||
return
|
||||
if(confirm == "Yes")
|
||||
world << "\red <b>Restarting world!</b> \blue Initiated by [usr.client.stealth ? "Admin" : usr.key]!"
|
||||
world << "\red <b>Restarting world!</b> \blue Initiated by [usr.client.holder.fakekey ? "Admin" : usr.key]!"
|
||||
log_admin("[key_name(usr)] initiated a reboot.")
|
||||
|
||||
feedback_set_details("end_error","admin reboot - by [usr.key] [usr.client.stealth ? "(stealth)" : ""]")
|
||||
feedback_set_details("end_error","admin reboot - by [usr.key] [usr.client.holder.fakekey ? "(stealth)" : ""]")
|
||||
feedback_add_details("admin_verb","R") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
if(blackbox)
|
||||
@@ -560,11 +560,12 @@ var/global/floorIsLava = 0
|
||||
set category = "Special Verbs"
|
||||
set name = "Announce"
|
||||
set desc="Announce your desires to the world"
|
||||
if(!usr.client.holder) return
|
||||
var/message = input("Global message to send:", "Admin Announce", null, null) as message
|
||||
if (message)
|
||||
if(usr.client.holder.rank != "Game Admin" && usr.client.holder.rank != "Game Master")
|
||||
message = adminscrub(message,500)
|
||||
world << "\blue <b>[usr.client.stealth ? "Administrator" : usr.key] Announces:</b>\n \t [message]"
|
||||
world << "\blue <b>[usr.client.holder.fakekey ? "Administrator" : usr.key] Announces:</b>\n \t [message]"
|
||||
log_admin("Announce: [key_name(usr)] : [message]")
|
||||
feedback_add_details("admin_verb","A") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -719,12 +720,13 @@ var/global/floorIsLava = 0
|
||||
set category = "Server"
|
||||
set desc="Reboots the server post haste"
|
||||
set name="Immediate Reboot"
|
||||
if(!usr.client.holder) return
|
||||
if( alert("Reboot server?",,"Yes","No") == "No")
|
||||
return
|
||||
world << "\red <b>Rebooting world!</b> \blue Initiated by [usr.client.stealth ? "Admin" : usr.key]!"
|
||||
world << "\red <b>Rebooting world!</b> \blue Initiated by [usr.client.holder.fakekey ? "Admin" : usr.key]!"
|
||||
log_admin("[key_name(usr)] initiated an immediate reboot.")
|
||||
|
||||
feedback_set_details("end_error","immediate admin reboot - by [usr.key] [usr.client.stealth ? "(stealth)" : ""]")
|
||||
feedback_set_details("end_error","immediate admin reboot - by [usr.key] [usr.client.holder.fakekey ? "(stealth)" : ""]")
|
||||
feedback_add_details("admin_verb","IR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
if(blackbox)
|
||||
|
||||
@@ -542,30 +542,26 @@
|
||||
/client/proc/colorooc()
|
||||
set category = "Fun"
|
||||
set name = "OOC Text Color"
|
||||
ooccolor = input(src, "Please select your OOC colour.", "OOC colour") as color
|
||||
if(holder)
|
||||
var/new_ooccolor = input(src, "Please select your OOC colour.", "OOC colour") as color|null
|
||||
if(new_ooccolor) holder.ooccolor = new_ooccolor
|
||||
feedback_add_details("admin_verb","OC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
return
|
||||
|
||||
/client/proc/stealth()
|
||||
set category = "Admin"
|
||||
set name = "Stealth Mode"
|
||||
if(!holder)
|
||||
src << "Only administrators may use this command."
|
||||
return
|
||||
stealth = !stealth
|
||||
if(stealth)
|
||||
var/new_key = trim(input("Enter your desired display name.", "Fake Key", key))
|
||||
if(!new_key)
|
||||
stealth = 0
|
||||
return
|
||||
new_key = strip_html(new_key)
|
||||
if(length(new_key) >= 26)
|
||||
new_key = copytext(new_key, 1, 26)
|
||||
fakekey = new_key
|
||||
else
|
||||
fakekey = null
|
||||
log_admin("[key_name(usr)] has turned stealth mode [stealth ? "ON" : "OFF"]")
|
||||
message_admins("[key_name_admin(usr)] has turned stealth mode [stealth ? "ON" : "OFF"]", 1)
|
||||
if(holder)
|
||||
if(holder.fakekey)
|
||||
holder.fakekey = null
|
||||
else
|
||||
var/new_key = ckeyEx(input("Enter your desired display name.", "Fake Key", key) as text|null)
|
||||
if(!new_key) return
|
||||
if(length(new_key) >= 26)
|
||||
new_key = copytext(new_key, 1, 26)
|
||||
holder.fakekey = new_key
|
||||
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!
|
||||
|
||||
#define AUTOBATIME 10
|
||||
@@ -659,8 +655,9 @@
|
||||
/client/proc/toggleadminhelpsound()
|
||||
set name = "Toggle Adminhelp Sound"
|
||||
set category = "Admin"
|
||||
sound_adminhelp = !sound_adminhelp
|
||||
if(sound_adminhelp)
|
||||
if(!holder) return
|
||||
holder.sound_adminhelp = !holder.sound_adminhelp
|
||||
if(holder.sound_adminhelp)
|
||||
usr << "You will now hear a sound when adminhelps arrive"
|
||||
else
|
||||
usr << "You will no longer hear a sound when adminhelps arrive"
|
||||
|
||||
@@ -8,13 +8,18 @@
|
||||
var/list/admin_datums = list()
|
||||
|
||||
/datum/admins
|
||||
var/rank = null
|
||||
var/client/owner = null
|
||||
var/state = null //state = 1 for playing //state = 2 for observing
|
||||
var/level = null
|
||||
var/rank = null
|
||||
var/client/owner = null
|
||||
var/state = null //state = 1 for playing //state = 2 for observing
|
||||
var/level = null
|
||||
|
||||
// var/permissions = 0
|
||||
|
||||
// var/stealth = 0
|
||||
var/fakekey = null
|
||||
var/ooccolor = "#b82e00"
|
||||
var/sound_adminhelp = 0 //If set to 1 this will play a sound when adminhelps are received.
|
||||
|
||||
var/datum/marked_datum
|
||||
|
||||
var/admincaster_screen = 0 //See newscaster.dm under machinery for a full description
|
||||
@@ -23,14 +28,8 @@ var/list/admin_datums = list()
|
||||
var/admincaster_signature //What you'll sign the newsfeeds as
|
||||
|
||||
/datum/admins/New(initial_rank)
|
||||
// if(!istype(C))
|
||||
// world.log << "## WARNING: [type] created with no client/C argument"
|
||||
// del(src)
|
||||
// return
|
||||
// C.holder = src
|
||||
admincaster_signature = "Nanotrasen Officer #[rand(0,9)][rand(0,9)][rand(0,9)]"
|
||||
rank = initial_rank
|
||||
// admin_list |= C
|
||||
..()
|
||||
|
||||
/datum/admins/Del()
|
||||
|
||||
@@ -97,7 +97,7 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an", "monkey", "ali
|
||||
admin_number++
|
||||
if( X.inactivity > AFK_THRESHOLD ) //When I made this, the AFK_THRESHOLD was 3000ds = 300s = 5m, see setup.dm for the new one.
|
||||
admin_number_afk++
|
||||
if(X.sound_adminhelp)
|
||||
if(X.holder.sound_adminhelp)
|
||||
X << 'sound/effects/adminhelp.ogg'
|
||||
var/check_laws_text = ""
|
||||
if(ai_found)
|
||||
@@ -114,7 +114,7 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an", "monkey", "ali
|
||||
admin_number++
|
||||
if( X.inactivity > AFK_THRESHOLD ) //When I made this, the AFK_THRESHOLD was 3000ds = 300s = 5m, see setup.dm for the new one.
|
||||
admin_number_afk++
|
||||
if(X.sound_adminhelp)
|
||||
if(X.holder.sound_adminhelp)
|
||||
X << 'sound/effects/adminhelp.ogg'
|
||||
var/msg_to_send = "\blue <b><font color=red>HELP: </font>[key_name(src, X)] (<A HREF='?src=\ref[X.holder];adminplayervars=[ref_client]'>VV</A>) (<A HREF='?src=\ref[X.holder];secretsadmin=check_antagonist'>CA</A>):</b> [msg]"
|
||||
msg_to_send = dd_replacetext(msg_to_send, "HOLDERREF", "\ref[X.holder]")
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
src << "<font color='blue'>PM to-<b>Admins</b>: [msg]</font>"
|
||||
|
||||
//play the recieving admin the adminhelp sound (if they have them enabled)
|
||||
if(C.sound_adminhelp)
|
||||
if(C.holder.sound_adminhelp)
|
||||
C << 'sound/effects/adminhelp.ogg'
|
||||
|
||||
else
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
if (!msg)
|
||||
return
|
||||
|
||||
var/rendered = "<span class='game deadsay'><span class='prefix'>DEAD:</span> <span class='name'>ADMIN([src.stealth ? pick("BADMIN", "hornigranny", "TLF", "scaredforshadows", "KSI", "Silnazi", "HerpEs", "BJ69", "SpoofedEdd", "Uhangay", "Wario90900", "Regarity", "MissPhareon", "LastFish", "unMportant", "Deurpyn", "Fatbeaver") : src.key])</span> says, <span class='message'>\"[msg]\"</span></span>"
|
||||
var/rendered = "<span class='game deadsay'><span class='prefix'>DEAD:</span> <span class='name'>ADMIN([src.holder.fakekey ? pick("BADMIN", "hornigranny", "TLF", "scaredforshadows", "KSI", "Silnazi", "HerpEs", "BJ69", "SpoofedEdd", "Uhangay", "Wario90900", "Regarity", "MissPhareon", "LastFish", "unMportant", "Deurpyn", "Fatbeaver") : src.key])</span> says, <span class='message'>\"[msg]\"</span></span>"
|
||||
|
||||
for (var/mob/M in player_list)
|
||||
if (istype(M, /mob/new_player))
|
||||
|
||||
@@ -182,7 +182,7 @@ proc/cmd_admin_mute(mob/M as mob, mute_type, automute = 0)
|
||||
log_admin("[key_name(usr)] has [(muteunmute ? "muted" : "voiced")] [key_name(M)] from [mute_string]")
|
||||
message_admins("[key_name_admin(usr)] has [(muteunmute ? "muted" : "voiced")] [key_name_admin(M)] from [mute_string].", 1)
|
||||
|
||||
M << "You have been [(muteunmute ? "muted" : "voiced")] from [mute_string] by [(usr.client.stealth)?"an admin":"[usr.client]"]."
|
||||
M << "You have been [(muteunmute ? "muted" : "voiced")] from [mute_string]."
|
||||
feedback_add_details("admin_verb","MUTE") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
else
|
||||
log_admin("SPAM AUTOMUTE: [(muteunmute ? "muted" : "voiced")] [key_name(M)] from [mute_string]")
|
||||
|
||||
@@ -5,10 +5,7 @@
|
||||
////////////////
|
||||
var/datum/admins/holder = null
|
||||
var/buildmode = 0
|
||||
var/stealth = 0
|
||||
var/fakekey = null
|
||||
var/seeprayers = 0
|
||||
var/ooccolor = "#b82e00"
|
||||
|
||||
var/muted_ic //can't use 'say' while alive or emotes.
|
||||
var/muted_ooc //can't speak in ooc
|
||||
@@ -20,7 +17,6 @@
|
||||
var/last_message_count = 0 //contins a number of how many times a message identical to last_message was sent.
|
||||
|
||||
var/warned = 0
|
||||
var/sound_adminhelp = 0 //If set to 1 this will play a sound when adminhelps are received.
|
||||
|
||||
/////////
|
||||
//OTHER//
|
||||
|
||||
@@ -742,9 +742,10 @@ datum/preferences
|
||||
|
||||
proc/setup_client(var/client/C)
|
||||
if(C)
|
||||
C.sound_adminhelp = src.sound_adminhelp
|
||||
if(C.holder)
|
||||
C.holder.sound_adminhelp = src.sound_adminhelp
|
||||
C.holder.ooccolor = src.ooccolor
|
||||
C.midis = src.midis
|
||||
C.ooccolor = src.ooccolor
|
||||
C.be_alien = be_special & BE_ALIEN
|
||||
C.be_pai = be_special & BE_PAI
|
||||
if(isnull(src.ghost_ears)) src.ghost_ears = 1 //There were problems where the default was null before someone saved their profile.
|
||||
|
||||
@@ -134,7 +134,7 @@ Starting up. [time2text(world.timeofday, "hh:mm.ss")]
|
||||
|
||||
for(var/client/C in client_list)
|
||||
if(C.holder)
|
||||
if(C.stealth)
|
||||
if(C.holder.fakekey)
|
||||
continue //so stealthmins aren't revealed by the hub
|
||||
admins++
|
||||
s["player[n]"] = C.key
|
||||
|
||||
Reference in New Issue
Block a user