Function __global->add_chatroom

Definitions

sources/chat2.php

  • Add a chatroom.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: int

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$welcome SHORT_TEXT No No required parameter N/A N/A The welcome message
$room_name SHORT_TEXT No No required parameter N/A N/A The room name
$room_owner ?MEMBER No No required parameter N/A N/A The room owner (null: none)
$allow2 LONG_TEXT No No required parameter N/A N/A The comma-separated list of users that may access it (blank: no restriction)
$allow2_groups LONG_TEXT No No required parameter N/A N/A The comma-separated list of usergroups that may access it (blank: no restriction)
$disallow2 LONG_TEXT No No required parameter N/A N/A The comma-separated list of users that may NOT access it (blank: no restriction)
$disallow2_groups LONG_TEXT No No required parameter N/A N/A The comma-separated list of usergroups that may NOT access it (blank: no restriction)
$room_language LANGUAGE_NAME No No required parameter N/A N/A The room language
$is_im BINARY No No 0 N/A N/A Whether it is an IM room

Returns

  • The chatroom ID
  • Type: AUTO_LINK
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Add a chatroom.
 *
 * @param  SHORT_TEXT $welcome The welcome message
 * @param  SHORT_TEXT $room_name The room name
 * @param  ?MEMBER $room_owner The room owner (null: none)
 * @param  LONG_TEXT $allow2 The comma-separated list of users that may access it (blank: no restriction)
 * @param  LONG_TEXT $allow2_groups The comma-separated list of usergroups that may access it (blank: no restriction)
 * @param  LONG_TEXT $disallow2 The comma-separated list of users that may NOT access it (blank: no restriction)
 * @param  LONG_TEXT $disallow2_groups The comma-separated list of usergroups that may NOT access it (blank: no restriction)
 * @param  LANGUAGE_NAME $room_language The room language
 * @param  BINARY $is_im Whether it is an IM room
 * @return AUTO_LINK The chatroom ID
 */

function add_chatroom(string $welcome, string $room_name, ?int $room_owner, string $allow2, string $allow2_groups, string $disallow2, string $disallow2_groups, string $room_language, int $is_im = 0) : int