Function __global->chat_post_message

Definitions

sources/chat.php

  • Enter a message into the database for the specified room, and with the specified parameters. The message is filtered for banned words, and is compressed into a Tempcode storage format.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: bool

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$room_id AUTO_LINK No No required parameter N/A N/A The room ID for the message to be posted in
$message LONG_TEXT No No required parameter N/A N/A The message body
$font_name SHORT_TEXT No No required parameter N/A N/A The font name for the message
$text_colour SHORT_TEXT No No required parameter N/A N/A The text colour for the message

Returns

  • Whether the message was successfully posted or not
  • Type: boolean
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Enter a message into the database for the specified room, and with the specified parameters. The message is filtered for banned words, and is compressed into a Tempcode storage format.
 *
 * @param  AUTO_LINK $room_id The room ID for the message to be posted in
 * @param  LONG_TEXT $message The message body
 * @param  SHORT_TEXT $font_name The font name for the message
 * @param  SHORT_TEXT $text_colour The text colour for the message
 * @return boolean Whether the message was successfully posted or not
 */

function chat_post_message(int $room_id, string $message, string $font_name, string $text_colour) : bool