mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Co-authored-by: Heroman3003 <31296024+Heroman3003@users.noreply.github.com> Co-authored-by: Selis <selis@xynolabs.com>
18 lines
511 B
Plaintext
18 lines
511 B
Plaintext
/**
|
|
* Message-related procs
|
|
*
|
|
* Message format (/list):
|
|
* - type - Message type, must be one of defines in `code/__DEFINES/chat.dm`
|
|
* - text - Plain message text
|
|
* - html - HTML message text
|
|
* - Optional metadata, can be any key/value pair.
|
|
*
|
|
* Copyright (c) 2020 Aleksej Komarov
|
|
* SPDX-License-Identifier: MIT
|
|
*/
|
|
|
|
/proc/message_to_html(message)
|
|
// Here it is possible to add a switch statement
|
|
// to custom-handle various message types.
|
|
return message["html"] || message["text"]
|