# Conflicts:
#	code/_helpers/unsorted.dm
#	code/controllers/subsystems/mapping_vr.dm
#	code/datums/datum.dm
#	code/datums/datumvars.dm
#	code/datums/supplypacks/voidsuits.dm
#	code/game/machinery/suit_storage_unit.dm
#	code/game/objects/items/devices/defib.dm
#	code/game/objects/items/weapons/tools/weldingtool.dm
#	code/game/world.dm
#	code/modules/client/preference_setup/loadout/loadout_accessories.dm
#	code/modules/client/preference_setup/loadout/loadout_eyes.dm
#	code/modules/client/preference_setup/loadout/loadout_head.dm
#	code/modules/client/preference_setup/loadout/loadout_suit.dm
#	code/modules/client/preference_setup/loadout/loadout_uniform.dm
#	code/modules/clothing/glasses/glasses.dm
#	code/modules/food/food/snacks.dm
#	code/modules/mob/living/carbon/human/species/station/station_vr.dm
#	code/modules/reagents/Chemistry-Recipes.dm
#	code/world.dm
#	config/custom_items.txt
#	config/example/config.txt
#	config/example/game_options.txt
#	icons/mob/robots.dmi
#	icons/obj/mining.dmi
#	maps/submaps/surface_submaps/wilderness/wilderness.dm
#	vorestation.dme
This commit is contained in:
Repede
2019-04-07 19:40:12 -04:00
1789 changed files with 447589 additions and 66985 deletions
-58
View File
@@ -60,64 +60,6 @@ var/list/topic_commands_names = list()
return errorcount
return 0
/datum/topic_command/send_adminmsg
name = "send_adminmsg"
description = "Sends a adminmessage to a player"
params = list(
"ckey" = list("name"="ckey","desc"="The target of the adminmessage","req"=1,"type"="str"),
"msg" = list("name"="msg","desc"="The message that should be sent","req"=1,"type"="str"),
"senderkey" = list("name"="senderkey","desc"="Unique id of the person that sent the adminmessage","req"=1,"type"="senderkey"),
"rank" = list("name"="rank","desc"="The rank that should be displayed - Defaults to admin if none specified","req"=0,"type"="str")
)
/datum/topic_command/send_adminmsg/run_command(queryparams)
/*
We got an adminmsg from IRC bot lets split the API
expected output:
1. ckey = ckey of person the message is to
2. msg = contents of message, parems2list requires
3. rank = Rank that should be displayed
4. senderkey = the ircnick that send the message.
*/
var/client/C
var/req_ckey = ckey(queryparams["ckey"])
for(var/client/K in clients)
if(K.ckey == req_ckey)
C = K
break
if(!C)
statuscode = 404
response = "No client with that name on server"
data = null
return 1
var/rank = queryparams["rank"]
if(!rank)
rank = "Admin"
var/message = "<font color='red'>[rank] PM from <b><a href='?discord_msg=[queryparams["senderkey"]]'>[queryparams["senderkey"]]</a></b>: [queryparams["msg"]]</font>"
var/amessage = "<font color='blue'>[rank] PM from <a href='?discord_msg=[queryparams["senderkey"]]'>[queryparams["senderkey"]]</a> to <b>[key_name(C)]</b> : [queryparams["msg"]]</font>"
C.received_discord_pm = world.time
C.discord_admin = queryparams["senderkey"]
C << 'sound/effects/adminhelp.ogg'
C << message
for(var/client/A in admins)
if(A != C)
A << amessage
statuscode = 200
response = "Admin Message sent"
data = null
return 1
/client
var/received_discord_pm
var/discord_admin