Adds empty filter classes to send messages to particular vchat filters. (#6998)

* Adds empty filter classes to send messages to particular vchat filters.
Adds combat log (playerside X hit Y) filter
Adds admin log, attack log, and debug log filters (Admin side)
Moves many unfiltered admin verb outputs to admin log filter

* unmatched tags
This commit is contained in:
Atermonera
2020-04-20 00:28:16 -07:00
committed by GitHub
parent 6a15586a74
commit 1ed5556b8f
24 changed files with 862 additions and 851 deletions
+94 -92
View File
@@ -63,23 +63,23 @@
switch(bantype)
if(BANTYPE_PERMA)
if(!banckey || !banreason)
to_chat(usr, "Not enough parameters (Requires ckey and reason)")
to_chat(usr, "<span class='filter_adminlog'>Not enough parameters (Requires ckey and reason)</span>")
return
banduration = null
banjob = null
if(BANTYPE_TEMP)
if(!banckey || !banreason || !banduration)
to_chat(usr, "Not enough parameters (Requires ckey, reason and duration)")
to_chat(usr, "<span class='filter_adminlog'>Not enough parameters (Requires ckey, reason and duration)</span>")
return
banjob = null
if(BANTYPE_JOB_PERMA)
if(!banckey || !banreason || !banjob)
to_chat(usr, "Not enough parameters (Requires ckey, reason and job)")
to_chat(usr, "<span class='filter_adminlog'>Not enough parameters (Requires ckey, reason and job)</span>")
return
banduration = null
if(BANTYPE_JOB_TEMP)
if(!banckey || !banreason || !banjob || !banduration)
to_chat(usr, "Not enough parameters (Requires ckey, reason and job)")
to_chat(usr, "<span class='filter_adminlog'>Not enough parameters (Requires ckey, reason and job)</span>")
return
var/mob/playermob
@@ -116,14 +116,14 @@
var/new_ckey = ckey(input(usr,"New admin's ckey","Admin ckey", null) as text|null)
if(!new_ckey) return
if(new_ckey in admin_datums)
to_chat(usr, "<font color='red'>Error: Topic 'editrights': [new_ckey] is already an admin</font>")
to_chat(usr, "<span class='filter_adminlog warning'>Error: Topic 'editrights': [new_ckey] is already an admin</span>")
return
adm_ckey = new_ckey
task = "rank"
else if(task != "show")
adm_ckey = ckey(href_list["ckey"])
if(!adm_ckey)
to_chat(usr, "<font color='red'>Error: Topic 'editrights': No valid ckey</font>")
to_chat(usr, "<span class='filter_adminlog warning'>Error: Topic 'editrights': No valid ckey</span>")
return
var/datum/admins/D = admin_datums[adm_ckey]
@@ -155,7 +155,7 @@
if(config.admin_legacy_system)
new_rank = ckeyEx(new_rank)
if(!new_rank)
to_chat(usr, "<font color='red'>Error: Topic 'editrights': Invalid rank</font>")
to_chat(usr, "<span class='filter_adminlog warning'>Error: Topic 'editrights': Invalid rank</span>")
return
if(config.admin_legacy_system)
if(admin_ranks.len)
@@ -264,7 +264,7 @@
var/mob/M = locate(href_list["mob"])
if(!ismob(M))
to_chat(usr, "This can only be used on instances of type /mob")
to_chat(usr, "<span class='filter_adminlog'>This can only be used on instances of type /mob</span>")
return
var/delmob = 0
@@ -370,14 +370,14 @@
var/mob/M = locate(href_list["jobban2"])
if(!ismob(M))
to_chat(usr, "This can only be used on instances of type /mob")
to_chat(usr, "<span class='filter_adminlog'>This can only be used on instances of type /mob</span>")
return
if(!M.ckey) //sanity
to_chat(usr, "This mob has no ckey")
to_chat(usr, "<span class='filter_adminlog'>This mob has no ckey</span>")
return
if(!job_master)
to_chat(usr, "Job Master has not been setup!")
to_chat(usr, "<span class='filter_adminlog'>Job Master has not been setup!</span>")
return
var/dat = ""
@@ -610,16 +610,16 @@
//JOBBAN'S INNARDS
else if(href_list["jobban3"])
if(!check_rights(R_MOD,0) && !check_rights(R_ADMIN,0))
to_chat(usr, "<span class='warning'>You do not have the appropriate permissions to add job bans!</span>")
to_chat(usr, "<span class='filter_adminlog warning'>You do not have the appropriate permissions to add job bans!</span>")
return
if(check_rights(R_MOD,0) && !check_rights(R_ADMIN,0) && !config.mods_can_job_tempban) // If mod and tempban disabled
to_chat(usr, "<span class='warning'>Mod jobbanning is disabled!</span>")
to_chat(usr, "<span class='filter_adminlog warning'>Mod jobbanning is disabled!</span>")
return
var/mob/M = locate(href_list["jobban4"])
if(!ismob(M))
to_chat(usr, "This can only be used on instances of type /mob")
to_chat(usr, "<span class='filter_adminlog'>This can only be used on instances of type /mob</span>")
return
if(M != usr) //we can jobban ourselves
@@ -628,7 +628,7 @@
return
if(!job_master)
to_chat(usr, "Job Master has not been setup!")
to_chat(usr, "<span class='filter_adminlog'>Job Master has not been setup!</span>")
return
//get jobs for department if specified, otherwise just returnt he one job in a list.
@@ -697,16 +697,16 @@
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='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, "<font color='red'>Your server is using the legacy banning system, which does not support temporary job bans. Consider upgrading. Aborting ban.</font>")
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>")
return
var/mins = input(usr,"How long (in minutes)?","Ban time",1440) as num|null
if(!mins)
return
if(check_rights(R_MOD, 0) && !check_rights(R_BAN, 0) && mins > config.mod_job_tempban_max)
to_chat(usr, "<span class='warning'> Moderators can only job tempban up to [config.mod_job_tempban_max] minutes!</span>")
to_chat(usr, "<span class='filter_adminlog warning'> Moderators can only job tempban up to [config.mod_job_tempban_max] minutes!</span>")
return
var/reason = sanitize(input(usr,"Reason?","Please State Reason","") as text|null)
if(!reason)
@@ -726,9 +726,9 @@
msg += ", [job]"
notes_add(M.ckey, "Banned from [msg] - [reason]", usr)
message_admins("<font color='blue'>[key_name_admin(usr)] banned [key_name_admin(M)] from [msg] for [mins] minutes</font>", 1)
to_chat(M, "<font color='red'><BIG><B>You have been jobbanned by [usr.client.ckey] from: [msg].</B></BIG></font>")
to_chat(M, "<font color='red'><B>The reason is: [reason]</B></font>")
to_chat(M, "<font color='red'>This jobban will be lifted in [mins] minutes.</font>")
to_chat(M, "<span class='filter_system'><font color='red'><BIG><B>You have been jobbanned by [usr.client.ckey] from: [msg].</B></BIG></font></span>")
to_chat(M, "<span class='filter_system'><font color='red'><B>The reason is: [reason]</B></font></span>")
to_chat(M, "<span class='filter_system'><font color='red'>This jobban will be lifted in [mins] minutes.</font></span>")
href_list["jobban2"] = 1 // lets it fall through and refresh
return 1
if("No")
@@ -747,9 +747,9 @@
else msg += ", [job]"
notes_add(M.ckey, "Banned from [msg] - [reason]", usr)
message_admins("<font color='blue'>[key_name_admin(usr)] banned [key_name_admin(M)] from [msg]</font>", 1)
to_chat(M, "<font color='red'><BIG><B>You have been jobbanned by [usr.client.ckey] from: [msg].</B></BIG></font>")
to_chat(M, "<font color='red'><B>The reason is: [reason]</B></font>")
to_chat(M, "<font color='red'>Jobban can be lifted only upon request.</font>")
to_chat(M, "<span class='filter_system'><font color='red'><BIG><B>You have been jobbanned by [usr.client.ckey] from: [msg].</B></BIG></font></span>")
to_chat(M, "<span class='filter_system'><font color='red'><B>The reason is: [reason]</B></font></span>")
to_chat(M, "<span class='filter_system'><font color='red'>Jobban can be lifted only upon request.</font></span>")
href_list["jobban2"] = 1 // lets it fall through and refresh
return 1
if("Cancel")
@@ -759,7 +759,7 @@
//all jobs in joblist are banned already OR we didn't give a reason (implying they shouldn't be banned)
if(joblist.len) //at least 1 banned job exists in joblist so we have stuff to unban.
if(!config.ban_legacy_system)
to_chat(usr, "Unfortunately, database based unbanning cannot be done through this panel")
to_chat(usr, "<span class='filter_adminlog'>Unfortunately, database based unbanning cannot be done through this panel</span>")
DB_ban_panel(M.ckey)
return
var/msg
@@ -780,7 +780,7 @@
continue
if(msg)
message_admins("<font color='blue'>[key_name_admin(usr)] unbanned [key_name_admin(M)] from [msg]</font>", 1)
to_chat(M, "<font color='red'><BIG><B>You have been un-jobbanned by [usr.client.ckey] from [msg].</B></BIG></font>")
to_chat(M, "<span class='filter_system danger'><BIG>You have been un-jobbanned by [usr.client.ckey] from [msg].</BIG></span>")
href_list["jobban2"] = 1 // lets it fall through and refresh
return 1
return 0 //we didn't do anything!
@@ -794,7 +794,7 @@
if(!reason)
return
to_chat(M, span("critical", "You have been kicked from the server: [reason]"))
to_chat(M, span("filter_system critical", "You have been kicked from the server: [reason]"))
log_admin("[key_name(usr)] booted [key_name(M)] for reason: '[reason]'.")
message_admins("<font color='blue'>[key_name_admin(usr)] booted [key_name_admin(M)] for reason '[reason]'.</font>", 1)
//M.client = null
@@ -844,15 +844,15 @@
AddBan(M.ckey, M.computer_id, reason, usr.ckey, 1, mins)
ban_unban_log_save("[usr.client.ckey] has banned [M.ckey]. - Reason: [reason] - This will be removed in [mins] minutes.")
notes_add(M.ckey,"[usr.client.ckey] has banned [M.ckey]. - Reason: [reason] - This will be removed in [mins] minutes.",usr)
to_chat(M, "<font color='red'><BIG><B>You have been banned by [usr.client.ckey].\nReason: [reason].</B></BIG></font>")
to_chat(M, "<font color='red'>This is a temporary ban, it will be removed in [mins] minutes.</font>")
to_chat(M, "<span class='filter_system critical'>You have been banned by [usr.client.ckey].\nReason: [reason].</span>")
to_chat(M, "<span class='filter_system warning'>This is a temporary ban, it will be removed in [mins] minutes.</span>")
feedback_inc("ban_tmp",1)
DB_ban_record(BANTYPE_TEMP, M, mins, reason)
feedback_inc("ban_tmp_mins",mins)
if(config.banappeals)
to_chat(M, "<font color='red'>To try to resolve this matter head to [config.banappeals]</font>")
to_chat(M, "<span class='filter_system warning'>To try to resolve this matter head to [config.banappeals]</span>")
else
to_chat(M, "<font color='red'>No ban appeals URL has been set.</font>")
to_chat(M, "<span class='filter_system warning'>No ban appeals URL has been set.</span>")
log_admin("[usr.client.ckey] has banned [M.ckey].\nReason: [reason]\nThis will be removed in [mins] minutes.")
message_admins("<font color='blue'>[usr.client.ckey] has banned [M.ckey].\nReason: [reason]\nThis will be removed in [mins] minutes.</font>")
var/datum/admin_help/AH = M.client ? M.client.current_ticket : null
@@ -871,12 +871,12 @@
AddBan(M.ckey, M.computer_id, reason, usr.ckey, 0, 0, M.lastKnownIP)
if("No")
AddBan(M.ckey, M.computer_id, reason, usr.ckey, 0, 0)
to_chat(M, "<font color='red'><BIG><B>You have been banned by [usr.client.ckey].\nReason: [reason].</B></BIG></font>")
to_chat(M, "<font color='red'>This is a permanent ban.</font>")
to_chat(M, "<span class='filter_system critical'>You have been banned by [usr.client.ckey].\nReason: [reason].</span>")
to_chat(M, "<span class='filter_system warning'>This is a permanent ban.</span>")
if(config.banappeals)
to_chat(M, "<font color='red'>To try to resolve this matter head to [config.banappeals]</font>")
to_chat(M, "<span class='filter_system warning'>To try to resolve this matter head to [config.banappeals]</span>")
else
to_chat(M, "<font color='red'>No ban appeals URL has been set.</font>")
to_chat(M, "<span class='filter_system warning'>No ban appeals URL has been set.</span>")
ban_unban_log_save("[usr.client.ckey] has permabanned [M.ckey]. - Reason: [reason] - This is a permanent ban.")
notes_add(M.ckey,"[usr.client.ckey] has permabanned [M.ckey]. - Reason: [reason] - This is a permanent ban.",usr)
log_admin("[usr.client.ckey] has banned [M.ckey].\nReason: [reason]\nThis is a permanent ban.")
@@ -962,7 +962,7 @@
var/mob/living/carbon/human/H = locate(href_list["monkeyone"])
if(!istype(H))
to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
to_chat(usr, "<span class='filter_adminlog'>This can only be used on instances of type /mob/living/carbon/human</span>")
return
log_admin("[key_name(usr)] attempting to monkeyize [key_name(H)]")
@@ -974,7 +974,7 @@
var/mob/living/carbon/human/H = locate(href_list["corgione"])
if(!istype(H))
to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
to_chat(usr, "<span class='filter_adminlog'>This can only be used on instances of type /mob/living/carbon/human</span>")
return
log_admin("[key_name(usr)] attempting to corgize [key_name(H)]")
@@ -986,7 +986,7 @@
var/mob/M = locate(href_list["forcespeech"])
if(!ismob(M))
to_chat(usr, "this can only be used on instances of type /mob")
to_chat(usr, "<span class='filter_adminlog'>this can only be used on instances of type /mob</span>")
var/speech = input("What will [key_name(M)] say?.", "Force speech", "")// Don't need to sanitize, since it does that in say(), we also trust our admins.
if(!speech) return
@@ -1003,10 +1003,10 @@
var/mob/M = locate(href_list["sendtoprison"])
if(!ismob(M))
to_chat(usr, "This can only be used on instances of type /mob")
to_chat(usr, "<span class='filter_adminlog'>This can only be used on instances of type /mob</span>")
return
if(istype(M, /mob/living/silicon/ai))
to_chat(usr, "This cannot be used on instances of type /mob/living/silicon/ai")
to_chat(usr, "<span class='filter_adminlog'>This cannot be used on instances of type /mob/living/silicon/ai</span>")
return
var/turf/prison_cell = pick(prisonwarp)
@@ -1031,7 +1031,7 @@
prisoner.equip_to_slot_or_del(new /obj/item/clothing/under/color/prison(prisoner), slot_w_uniform)
prisoner.equip_to_slot_or_del(new /obj/item/clothing/shoes/orange(prisoner), slot_shoes)
to_chat(M, "<font color='red'>You have been sent to the prison station!</font>")
to_chat(M, "<span class='filter_system warning'>You have been sent to the prison station!</span>")
log_admin("[key_name(usr)] sent [key_name(M)] to the prison station.")
message_admins("<font color='blue'>[key_name_admin(usr)] sent [key_name_admin(M)] to the prison station.</font>", 1)
@@ -1041,11 +1041,11 @@
var/mob/M = locate(href_list["sendbacktolobby"])
if(!isobserver(M))
to_chat(usr, "<span class='notice'>You can only send ghost players back to the Lobby.</span>")
to_chat(usr, "<span class='filter_adminlog notice'>You can only send ghost players back to the Lobby.</span>")
return
if(!M.client)
to_chat(usr, "<span class='warning'>[M] doesn't seem to have an active client.</span>")
to_chat(usr, "<span class='filter_adminlog warning'>[M] doesn't seem to have an active client.</span>")
return
if(alert(usr, "Send [key_name(M)] back to Lobby?", "Message", "Yes", "No") != "Yes")
@@ -1066,10 +1066,10 @@
var/mob/M = locate(href_list["tdome1"])
if(!ismob(M))
to_chat(usr, "This can only be used on instances of type /mob")
to_chat(usr, "<span class='filter_adminlog'>This can only be used on instances of type /mob</span>")
return
if(istype(M, /mob/living/silicon/ai))
to_chat(usr, "This cannot be used on instances of type /mob/living/silicon/ai")
to_chat(usr, "<span class='filter_adminlog'>This cannot be used on instances of type /mob/living/silicon/ai</span>")
return
for(var/obj/item/I in M)
@@ -1079,7 +1079,7 @@
sleep(5)
M.loc = pick(tdome1)
spawn(50)
to_chat(M, "<font color='blue'>You have been sent to the Thunderdome.</font>")
to_chat(M, "<span class='filter_system notice'>You have been sent to the Thunderdome.</span>")
log_admin("[key_name(usr)] has sent [key_name(M)] to the thunderdome. (Team 1)")
message_admins("[key_name_admin(usr)] has sent [key_name_admin(M)] to the thunderdome. (Team 1)", 1)
@@ -1091,10 +1091,10 @@
var/mob/M = locate(href_list["tdome2"])
if(!ismob(M))
to_chat(usr, "This can only be used on instances of type /mob")
to_chat(usr, "<span class='filter_adminlog'>This can only be used on instances of type /mob</span>")
return
if(istype(M, /mob/living/silicon/ai))
to_chat(usr, "This cannot be used on instances of type /mob/living/silicon/ai")
to_chat(usr, "<span class='filter_adminlog'>This cannot be used on instances of type /mob/living/silicon/ai</span>")
return
for(var/obj/item/I in M)
@@ -1104,7 +1104,7 @@
sleep(5)
M.loc = pick(tdome2)
spawn(50)
to_chat(M, "<font color='blue'>You have been sent to the Thunderdome.</font>")
to_chat(M, "<span class='filter_system notice'>You have been sent to the Thunderdome.</span>")
log_admin("[key_name(usr)] has sent [key_name(M)] to the thunderdome. (Team 2)")
message_admins("[key_name_admin(usr)] has sent [key_name_admin(M)] to the thunderdome. (Team 2)", 1)
@@ -1116,17 +1116,17 @@
var/mob/M = locate(href_list["tdomeadmin"])
if(!ismob(M))
to_chat(usr, "This can only be used on instances of type /mob")
to_chat(usr, "<span class='filter_adminlog'>This can only be used on instances of type /mob</span>")
return
if(istype(M, /mob/living/silicon/ai))
to_chat(usr, "This cannot be used on instances of type /mob/living/silicon/ai")
to_chat(usr, "<span class='filter_adminlog'>This cannot be used on instances of type /mob/living/silicon/ai</span>")
return
M.Paralyse(5)
sleep(5)
M.loc = pick(tdomeadmin)
spawn(50)
to_chat(M, "<font color='blue'>You have been sent to the Thunderdome.</font>")
to_chat(M, "<span class='filter_system notice'>You have been sent to the Thunderdome.</span>")
log_admin("[key_name(usr)] has sent [key_name(M)] to the thunderdome. (Admin.)")
message_admins("[key_name_admin(usr)] has sent [key_name_admin(M)] to the thunderdome. (Admin.)", 1)
@@ -1138,10 +1138,10 @@
var/mob/M = locate(href_list["tdomeobserve"])
if(!ismob(M))
to_chat(usr, "This can only be used on instances of type /mob")
to_chat(usr, "<span class='filter_adminlog'>This can only be used on instances of type /mob</span>")
return
if(istype(M, /mob/living/silicon/ai))
to_chat(usr, "This cannot be used on instances of type /mob/living/silicon/ai")
to_chat(usr, "<span class='filter_adminlog'>This cannot be used on instances of type /mob/living/silicon/ai</span>")
return
for(var/obj/item/I in M)
@@ -1155,7 +1155,7 @@
sleep(5)
M.loc = pick(tdomeobserve)
spawn(50)
to_chat(M, "<font color='blue'>You have been sent to the Thunderdome.</font>")
to_chat(M, "<span class='filter_system notice'>You have been sent to the Thunderdome.</span>")
log_admin("[key_name(usr)] has sent [key_name(M)] to the thunderdome. (Observer.)")
message_admins("[key_name_admin(usr)] has sent [key_name_admin(M)] to the thunderdome. (Observer.)", 1)
@@ -1164,7 +1164,7 @@
var/mob/living/L = locate(href_list["revive"])
if(!istype(L))
to_chat(usr, "This can only be used on instances of type /mob/living")
to_chat(usr, "<span class='filter_adminlog'>This can only be used on instances of type /mob/living</span>")
return
if(config.allow_admin_rev)
@@ -1172,14 +1172,14 @@
message_admins("<font color='red'>Admin [key_name_admin(usr)] healed / revived [key_name_admin(L)]!</font>", 1)
log_admin("[key_name(usr)] healed / Rrvived [key_name(L)]")
else
to_chat(usr, "Admin Rejuvinates have been disabled")
to_chat(usr, "<span class='filter_adminlog filter_warning'>Admin Rejuvinates have been disabled</span>")
else if(href_list["makeai"])
if(!check_rights(R_SPAWN)) return
var/mob/living/carbon/human/H = locate(href_list["makeai"])
if(!istype(H))
to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
to_chat(usr, "<span class='filter_adminlog'>This can only be used on instances of type /mob/living/carbon/human</span>")
return
message_admins("<font color='red'>Admin [key_name_admin(usr)] AIized [key_name_admin(H)]!</font>", 1)
@@ -1191,7 +1191,7 @@
var/mob/living/carbon/human/H = locate(href_list["makealien"])
if(!istype(H))
to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
to_chat(usr, "<span class='filter_adminlog'>This can only be used on instances of type /mob/living/carbon/human</span>")
return
usr.client.cmd_admin_alienize(H)
@@ -1201,7 +1201,7 @@
var/mob/living/carbon/human/H = locate(href_list["makerobot"])
if(!istype(H))
to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
to_chat(usr, "<span class='filter_adminlog'>This can only be used on instances of type /mob/living/carbon/human</span>")
return
usr.client.cmd_admin_robotize(H)
@@ -1211,7 +1211,7 @@
var/mob/M = locate(href_list["makeanimal"])
if(istype(M, /mob/new_player))
to_chat(usr, "This cannot be used on instances of type /mob/new_player")
to_chat(usr, "<span class='filter_adminlog'>This cannot be used on instances of type /mob/new_player</span>")
return
usr.client.cmd_admin_animalize(M)
@@ -1230,7 +1230,7 @@
var/mob/living/carbon/human/H = locate(href_list["togmutate"])
if(!istype(H))
to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
to_chat(usr, "<span class='filter_adminlog'>This can only be used on instances of type /mob/living/carbon/human</span>")
return
var/block=text2num(href_list["block"])
usr.client.cmd_admin_toggle_block(H,block)
@@ -1273,7 +1273,7 @@
for(var/client/X in admins)
if((R_ADMIN|R_MOD|R_EVENT|R_SERVER) & X.holder.rights)
to_chat(X, take_msg)
to_chat(M, "<span class='notice'><b>Your adminhelp is being attended to by [usr.client]. Thanks for your patience!</b></span>")
to_chat(M, "<span class='filter_pm notice'><b>Your adminhelp is being attended to by [usr.client]. Thanks for your patience!</b></span>")
else
to_chat(usr, "<span class='warning'>Unable to locate mob.</span>")
@@ -1295,7 +1295,7 @@
else if(href_list["adminmoreinfo"])
var/mob/M = locate(href_list["adminmoreinfo"])
if(!ismob(M))
to_chat(usr, "This can only be used on instances of type /mob")
to_chat(usr, "<span class='filter_adminlog'>This can only be used on instances of type /mob</span>")
return
var/location_description = ""
@@ -1335,19 +1335,20 @@
if(MALE,FEMALE) gender_description = "[M.gender]"
else gender_description = "<font color='red'><b>[M.gender]</b></font>"
to_chat(src.owner, "<b>Info about [M.name]:</b> ")
to_chat(src.owner, "Mob type = [M.type]; Gender = [gender_description] Damage = [health_description]")
to_chat(src.owner, "Name = <b>[M.name]</b>; Real_name = [M.real_name]; Mind_name = [M.mind?"[M.mind.name]":""]; Key = <b>[M.key]</b>;")
to_chat(src.owner, "Location = [location_description];")
to_chat(src.owner, "[special_role_description]")
to_chat(src.owner, "(<a href='?src=\ref[usr];priv_msg=\ref[M]'>PM</a>) (<A HREF='?src=\ref[src];adminplayeropts=\ref[M]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[M]'>VV</A>) (<A HREF='?src=\ref[src];subtlemessage=\ref[M]'>SM</A>) ([admin_jump_link(M, src)]) (<A HREF='?src=\ref[src];secretsadmin=check_antagonist'>CA</A>)")
to_chat(src.owner, "<span class='filter_adminlog'><b>Info about [M.name]:</b><br>\
Mob type = [M.type]; Gender = [gender_description] Damage = [health_description]<br>\
Name = <b>[M.name]</b>; Real_name = [M.real_name]; Mind_name = [M.mind?"[M.mind.name]":""]; Key = <b>[M.key]</b>;<br>\
Location = [location_description];<br>\
[special_role_description]<br>\
(<a href='?src=\ref[usr];priv_msg=\ref[M]'>PM</a>) (<A HREF='?src=\ref[src];adminplayeropts=\ref[M]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[M]'>VV</A>) \
(<A HREF='?src=\ref[src];subtlemessage=\ref[M]'>SM</A>) ([admin_jump_link(M, src)]) (<A HREF='?src=\ref[src];secretsadmin=check_antagonist'>CA</A>)</span>")
else if(href_list["adminspawncookie"])
if(!check_rights(R_ADMIN|R_FUN|R_EVENT)) return
var/mob/living/carbon/human/H = locate(href_list["adminspawncookie"])
if(!ishuman(H))
to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
to_chat(usr, "<span class='filter_adminlog'>This can only be used on instances of type /mob/living/carbon/human</span>")
return
H.equip_to_slot_or_del( new /obj/item/weapon/reagent_containers/food/snacks/cookie(H), slot_l_hand )
@@ -1364,14 +1365,14 @@
log_admin("[key_name(H)] got their cookie, spawned by [key_name(src.owner)]")
message_admins("[key_name(H)] got their cookie, spawned by [key_name(src.owner)]")
feedback_inc("admin_cookies_spawned",1)
to_chat(H, "<font color='blue'>Your prayers have been answered!! You received the <b>best cookie</b>!</font>")
to_chat(H, "<span class='notice'>Your prayers have been answered!! You received the <b>best cookie</b>!</span>")
else if(href_list["adminsmite"])
if(!check_rights(R_ADMIN|R_FUN|R_EVENT)) return
var/mob/living/carbon/human/H = locate(href_list["adminsmite"])
if(!ishuman(H))
to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
to_chat(usr, "<span class='filter_adminlog'>This can only be used on instances of type /mob/living/carbon/human</span>")
return
owner.smite(H)
@@ -1381,7 +1382,7 @@
var/mob/living/M = locate(href_list["BlueSpaceArtillery"])
if(!isliving(M))
to_chat(usr, "This can only be used on instances of type /mob/living")
to_chat(usr, "<span class='filter_adminlog'>This can only be used on instances of type /mob/living</span>")
return
if(alert(src.owner, "Are you sure you wish to hit [key_name(M)] with Blue Space Artillery?", "Confirm Firing?" , "Yes" , "No") != "Yes")
@@ -1392,14 +1393,14 @@
else if(href_list["CentComReply"])
var/mob/living/L = locate(href_list["CentComReply"])
if(!istype(L))
to_chat(usr, "This can only be used on instances of type /mob/living/")
to_chat(usr, "<span class='filter_adminlog'>This can only be used on instances of type /mob/living/</span>")
return
if(L.can_centcom_reply())
var/input = sanitize(input(src.owner, "Please enter a message to reply to [key_name(L)] via their headset.","Outgoing message from CentCom", ""))
if(!input) return
to_chat(src.owner, "You sent [input] to [L] via a secure channel.")
to_chat(src.owner, "<span class='filter_adminlog'>You sent [input] to [L] via a secure channel.</span>")
log_admin("[src.owner] replied to [key_name(L)]'s CentCom message with the message [input].")
message_admins("[src.owner] replied to [key_name(L)]'s CentCom message with: \"[input]\"")
if(!isAI(L))
@@ -1409,24 +1410,25 @@
to_chat(L, "<span class='notice'>[input]</span>")
to_chat(L, "<span class='info'>Message ends.</span>")
else
to_chat(src.owner, "The person you are trying to contact does not have functional radio equipment.")
to_chat(src.owner, "<span class='filter_adminlog'>The person you are trying to contact does not have functional radio equipment.</span>")
else if(href_list["SyndicateReply"])
var/mob/living/carbon/human/H = locate(href_list["SyndicateReply"])
if(!istype(H))
to_chat(usr, "This can only be used on instances of type /mob/living/carbon/human")
to_chat(usr, "<span class='filter_adminlog'>This can only be used on instances of type /mob/living/carbon/human</span>")
return
if(!istype(H.l_ear, /obj/item/device/radio/headset) && !istype(H.r_ear, /obj/item/device/radio/headset))
to_chat(usr, "The person you are trying to contact is not wearing a headset")
to_chat(usr, "<span class='filter_adminlog'>The person you are trying to contact is not wearing a headset</span>")
return
var/input = sanitize(input(src.owner, "Please enter a message to reply to [key_name(H)] via their headset.","Outgoing message from a shadowy figure...", ""))
if(!input) return
to_chat(src.owner, "You sent [input] to [H] via a secure channel.")
to_chat(src.owner, "<span class='filter_adminlog'>You sent [input] to [H] via a secure channel.</span>")
log_admin("[src.owner] replied to [key_name(H)]'s illegal message with the message [input].")
to_chat(H, "You hear something crackle in your headset for a moment before a voice speaks. \"Please stand by for a message from your benefactor. Message as follows, agent. <b>\"[input]\"</b> Message ends.\"")
to_chat(H, "<span class='filter_notice'>You hear something crackle in your headset for a moment before a voice speaks. \
\"Please stand by for a message from your benefactor. Message as follows, agent. <b>\"[input]\"</b> Message ends.\"</span>")
else if(href_list["AdminFaxView"])
var/obj/item/fax = locate(href_list["AdminFaxView"])
@@ -1448,7 +1450,7 @@
usr << browse(data, "window=[B.name]")
else
to_chat(usr, "<font color='red'>The faxed item is not viewable. This is probably a bug, and should be reported on the tracker: [fax.type]</font>")
to_chat(usr, "<span class='warning'>The faxed item is not viewable. This is probably a bug, and should be reported on the tracker: [fax.type]</span>")
else if (href_list["AdminFaxViewPage"])
var/page = text2num(href_list["AdminFaxViewPage"])
@@ -1520,7 +1522,7 @@
var/mob/M = locate(href_list["traitor"])
if(!ismob(M))
to_chat(usr, "This can only be used on instances of type /mob.")
to_chat(usr, "<span class='filter_adminlog'>This can only be used on instances of type /mob.</span>")
return
show_traitor_panel(M)
@@ -1544,7 +1546,7 @@
if(!check_rights(R_SPAWN)) return
if(!config.allow_admin_spawning)
to_chat(usr, "Spawning of items is not allowed.")
to_chat(usr, "<span class='filter_adminlog'>Spawning of items is not allowed.</span>")
return
var/atom/loc = usr.loc
@@ -1604,24 +1606,24 @@
where = "onfloor"
if( where == "inhand" )
to_chat(usr, "Support for inhand not available yet. Will spawn on floor.")
to_chat(usr, "<span class='filter_adminlog'>Support for inhand not available yet. Will spawn on floor.</span>")
where = "onfloor"
if ( where == "inhand" ) //Can only give when human or monkey
if ( !( ishuman(usr) || issmall(usr) ) )
to_chat(usr, "Can only spawn in hand when you're a human or a monkey.")
to_chat(usr, "<span class='filter_adminlog'>Can only spawn in hand when you're a human or a monkey.</span>")
where = "onfloor"
else if ( usr.get_active_hand() )
to_chat(usr, "Your active hand is full. Spawning on floor.")
to_chat(usr, "<span class='filter_adminlog'>Your active hand is full. Spawning on floor.</span>")
where = "onfloor"
if ( where == "inmarked" )
if ( !marked_datum )
to_chat(usr, "You don't have any object marked. Abandoning spawn.")
to_chat(usr, "<span class='filter_adminlog'>You don't have any object marked. Abandoning spawn.</span>")
return
else
if ( !istype(marked_datum,/atom) )
to_chat(usr, "The object you have marked cannot be used as a target. Target must be of type /atom. Abandoning spawn.")
to_chat(usr, "<span class='filter_adminlog'>The object you have marked cannot be used as a target. Target must be of type /atom. Abandoning spawn.</span>")
return
var/atom/target //Where the object will be spawned
@@ -1873,17 +1875,17 @@
if(check_rights(R_SPAWN|R_EVENT))
var/mob/M = locate(href_list["toglang"])
if(!istype(M))
to_chat(usr, "[M] is illegal type, must be /mob!")
to_chat(usr, "<span class='filter_adminlog'>[M] is illegal type, must be /mob!</span>")
return
var/lang2toggle = href_list["lang"]
var/datum/language/L = GLOB.all_languages[lang2toggle]
if(L in M.languages)
if(!M.remove_language(lang2toggle))
to_chat(usr, "Failed to remove language '[lang2toggle]' from \the [M]!")
to_chat(usr, "<span class='filter_adminlog'>Failed to remove language '[lang2toggle]' from \the [M]!</span>")
else
if(!M.add_language(lang2toggle))
to_chat(usr, "Failed to add language '[lang2toggle]' from \the [M]!")
to_chat(usr, "<span class='filter_adminlog'>Failed to add language '[lang2toggle]' from \the [M]!</span>")
show_player_panel(M)