HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

ocPortal Developer's Guide: Chat

» Return to Contents



The chat API is a system of functions designed to be used by several frontends to the same chat structure. Systems such as the web-based chat, and shoutbox have access to the same chatrooms and messages through this API.
Some people may have noticed special return codes for certain functions in the 2.0 release. These have been removed for 2.1, as we have decided not to create a flash-based chat frontend, which would require these codes.

sources/chat.php

Global_functions_chat.php

Function summary

void init__chat ()
void messages_script ()
boolean member_befriended (MEMBER member_id)
?object shoutbox_script (boolean ret, ?AUTO_LINK room_id, ?integer num_messages)
void chat_logs_script ()
string filter_invites_for_blocking (string people)
void chat_room_prune (AUTO_LINK room_id, ?array room_row)
void _chat_messages_script_ajax (AUTO_LINK room_id, boolean backlog, ?AUTO_LINK message_id, ?AUTO_LINK event_id, string events_output)
boolean chatter_active (MEMBER member_id, ?AUTO_LINK room_id)
boolean is_chat_moderator (MEMBER member_id, AUTO_LINK room_id, ?MEMBER room_owner)
void _chat_post_message_ajax (AUTO_LINK room_id, string message, string font, string colour, BINARY first_message)
void enter_chat_lobby ()
array get_chatters_in_room (?AUTO_LINK room_id)
tempcode get_chatters_in_room_tpl (array users)
?SHORT_TEXT get_chatroom_name (AUTO_LINK room_id, boolean allow_null)
?AUTO_LINK get_chatroom_id (SHORT_TEXT room_name, boolean must_not_be_im)
boolean chat_post_message (AUTO_LINK room_id, LONG_TEXT message, SHORT_TEXT font_name, SHORT_TEXT text_colour, SHORT_INTEGER wrap_pos)
array chat_get_all_rooms ()
array chat_get_room_content (AUTO_LINK room_id, array _rooms, ?integer cutoff, boolean dereference, boolean downloading, ?integer start, ?integer finish, ?integer uptoid, ?ID_TEXT zone, ?AUTO_LINK entering_room, boolean return_my_messages, boolean return_system_messages)
array _deal_with_chatcode_tags (string text, string tag, string pm_user, string pm_message, SHORT_TEXT username, ?integer cutoff, ID_TEXT zone, AUTO_LINK room_id, BINARY system_message)
array _deal_with_chatcode_private (string pm_user, string pm_message, SHORT_TEXT username, string text, AUTO_LINK room_id, BINARY system_message)
array _deal_with_chatcode_invite (string pm_user, string pm_message, SHORT_TEXT username, string text, ID_TEXT zone)
array _deal_with_chatcode_newroom (string pm_user, string pm_message, SHORT_TEXT username, string text, ?integer cutoff)
array _remove_empty_messages (array messages, array message_ids)
string parse_allow_list_input (string _allow)
string chat_convert_html_entities (string string)
boolean check_chatroom_access (mixed room, boolean ret, ?MEMBER member_id, boolean must_be_explicit)
boolean handle_chatroom_pruning (array row)
map get_effect_set (boolean only_overridable)
array get_effect_settings (boolean full_urls, ?MEMBER for_member, boolean all_members)
tempcode get_chat_sound_tpl ()

void init__chat()

Standard code module initialisation function.

Parameters…

(No return value)


Return to the function index for this class Expand: View the source code to this function

void messages_script()

High-level messages script handling

Parameters…

(No return value)


Return to the function index for this class Expand: View the source code to this function

boolean member_befriended(MEMBER member_id)

Find if a member is befriended by the current member.

Parameters…

Name member_id
Description The member being checked
Type MEMBER

Returns…

Description Whether the member is befriended
Type boolean

Return to the function index for this class Expand: View the source code to this function

?object shoutbox_script(boolean ret, ?AUTO_LINK room_id, ?integer num_messages)

Outputs the shoutbox iframe.

Parameters…

Name ret
Description Whether to get the output instead of outputting it directly
Default value boolean-false
Type boolean

Name room_id
Description Chat room ID (NULL: read from environment)
Default value
Type ?AUTO_LINK

Name num_messages
Description The maximum number of messages to show (NULL: read from environment)
Default value
Type ?integer

Returns…

Description Output (NULL: outputted it already)
Type ?object

Return to the function index for this class Expand: View the source code to this function

void chat_logs_script()

Pass out chat log files.

Parameters…

(No return value)


Return to the function index for this class Expand: View the source code to this function

string filter_invites_for_blocking(string people)

Filter an invite list to make sure people who are blocking don't get drawn in and hence their blocking unmasked.

Parameters…

Name people
Description Comma-separated people list
Type string

Returns…

Description Filtered comma-separated people list
Type string

Return to the function index for this class Expand: View the source code to this function

void chat_room_prune(AUTO_LINK room_id, ?array room_row)

Prune membership of chat room.

Parameters…

Name room_id
Description Room ID (or -1 if all rooms)
Type AUTO_LINK

Name room_row
Description The room row (NULL: read in from DB)
Default value
Type ?array

(No return value)


Return to the function index for this class Expand: View the source code to this function

void _chat_messages_script_ajax(AUTO_LINK room_id, boolean backlog, ?AUTO_LINK message_id, ?AUTO_LINK event_id, string events_output)

Output messages (in XML format) from up to five minutes ago (give somebody who's just joined the chatroom some chat backlog), or the messages posted since the last check.

Parameters…

Name room_id
Description Room ID (or -1 to mean 'all' as used for IM global process, -2 to mean none)
Type AUTO_LINK

Name backlog
Description Output the backlog?
Default value boolean-false
Type boolean

Name message_id
Description Latest received message ID (NULL: we're not getting latest messages)
Default value
Type ?AUTO_LINK

Name event_id
Description Latest event ID (NULL: we're not getting events, but we do request a null event so we can use that as a future reference point)
Default value
Type ?AUTO_LINK

Name events_output
Description Events output to append
Default value
Type string

(No return value)


Return to the function index for this class Expand: View the source code to this function

boolean chatter_active(MEMBER member_id, ?AUTO_LINK room_id)

Find whether a member is active in chat (i.e. not away).

Parameters…

Name member_id
Description Member ID
Type MEMBER

Name room_id
Description Room ID (NULL: lobby)
Default value
Type ?AUTO_LINK

Returns…

Description Whether the member is active
Type boolean

Return to the function index for this class Expand: View the source code to this function

boolean is_chat_moderator(MEMBER member_id, AUTO_LINK room_id, ?MEMBER room_owner)

Find whether a member is a moderator of a chat room.

Parameters…

Name member_id
Description Member ID
Type MEMBER

Name room_id
Description Room ID
Type AUTO_LINK

Name room_owner
Description Room owner (NULL: none)
Type ?MEMBER

Returns…

Description Whether the member is a moderator of the chat room
Type boolean

Return to the function index for this class Expand: View the source code to this function

void _chat_post_message_ajax(AUTO_LINK room_id, string message, string font, string colour, BINARY first_message)

Handle an AJAX message posting request.

Parameters…

Name room_id
Description Room ID
Type AUTO_LINK

Name message
Description The message
Type string

Name font
Description Font name
Type string

Name colour
Description Font colour
Type string

Name first_message
Description Whether this is the first message sent out to this room, since some change
Type BINARY

(No return value)


Return to the function index for this class Expand: View the source code to this function

void enter_chat_lobby()

Enter the current member to the chat lobby / Mark them available.

Parameters…

(No return value)


Return to the function index for this class Expand: View the source code to this function

array get_chatters_in_room(?AUTO_LINK room_id)

Get the people who have posted a message in the specified room within the last x minutes (defaults to five). Note that this function performs no pruning- the chat lobby will do that. It does do an activity time-range select though.

Parameters…

Name room_id
Description The room ID (NULL: lobby)
Type ?AUTO_LINK

Returns…

Description A map of members in the room. User ID=>Username
Type array

Return to the function index for this class Expand: View the source code to this function

tempcode get_chatters_in_room_tpl(array users)

Get some template code showing the number of chatters in a room.

Parameters…

Name users
Description A mapping (user=>username) of the chatters in the room
Type array

Returns…

Description The Tempcode
Type tempcode

Return to the function index for this class Expand: View the source code to this function

?SHORT_TEXT get_chatroom_name(AUTO_LINK room_id, boolean allow_null)

Get the textual name of the specified chatroom, from its room id.

Parameters…

Name room_id
Description The room ID
Type AUTO_LINK

Name allow_null
Description Allow the chatroom to not be found (i.e. don't die if it can't be)
Default value boolean-false
Type boolean

Returns…

Description The room name (NULL: not found)
Type ?SHORT_TEXT

Return to the function index for this class Expand: View the source code to this function

?AUTO_LINK get_chatroom_id(SHORT_TEXT room_name, boolean must_not_be_im)

Get the id of the specified chatroom, from its room name.

Parameters…

Name room_name
Description The name of the chatroom
Type SHORT_TEXT

Name must_not_be_im
Description Make sure the room is not an IM room. If it is an IM room, pretend it does not exist.
Default value boolean-false
Type boolean

Returns…

Description The ID of the chatroom (NULL: no such chat room)
Type ?AUTO_LINK

Return to the function index for this class Expand: View the source code to this function

boolean chat_post_message(AUTO_LINK room_id, LONG_TEXT message, SHORT_TEXT font_name, SHORT_TEXT text_colour, SHORT_INTEGER wrap_pos)

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.

Parameters…

Name room_id
Description The room ID for the message to be posted in
Type AUTO_LINK

Name message
Description The message body
Type LONG_TEXT

Name font_name
Description The font name for the message
Type SHORT_TEXT

Name text_colour
Description The text colour for the message
Type SHORT_TEXT

Name wrap_pos
Description The wrap position for the message
Default value 60
Type SHORT_INTEGER

Returns…

Description Whether the message was successfully posted or not
Type boolean

Return to the function index for this class Expand: View the source code to this function

array chat_get_all_rooms()

Get an array of all the chatrooms.

Parameters…

Returns…

Description An array of all the chatrooms
Type array

Return to the function index for this class Expand: View the source code to this function

array chat_get_room_content(AUTO_LINK room_id, array _rooms, ?integer cutoff, boolean dereference, boolean downloading, ?integer start, ?integer finish, ?integer uptoid, ?ID_TEXT zone, ?AUTO_LINK entering_room, boolean return_my_messages, boolean return_system_messages)

Get a multidimensional array of the content of the specified chatroom. It automatically parses for comcode, chatcode, banned words, smilies, and uses complex logic to decide whether or not to show each message; based upon who the member is, the message content, and other such inputs.If you set the $dereference flag, all the messages will be dereferenced for you, and if you set the $downloading flag, the array is returned in a format appropriate for things like downloading the chat logs.$start and $finish are used to cutoff the number of messages returned, based on their posting date and time, and the $uptoid variable is used to make the function only return the messages newer than the id specified.

Parameters…

Name room_id
Description The room ID (-1 for IM)
Type AUTO_LINK

Name _rooms
Description Rooms database rows that we'll need
Type array

Name cutoff
Description The maximum number of messages to be returned (NULL: no maximum)
Default value
Type ?integer

Name dereference
Description Whether to dereference the returned messages
Default value boolean-false
Type boolean

Name downloading
Description Whether to return the messages in a downloadeable format (using the templates for log downloading)
Default value boolean-false
Type boolean

Name start
Description The datetime stamp to start gathering messages from (NULL: all)
Default value
Type ?integer

Name finish
Description The datetime stamp to stop gathering messages at (NULL: current time)
Default value
Type ?integer

Name uptoid
Description The lowest message ID to return (NULL: no special lowest number)
Default value
Type ?integer

Name zone
Description The zone the chat module is in (NULL: find it)
Default value
Type ?ID_TEXT

Name entering_room
Description The language ID for the "entering room" message (NULL: not entering the room)
Default value
Type ?AUTO_LINK

Name return_my_messages
Description Return the current user's messages?
Default value boolean-true
Type boolean

Name return_system_messages
Description Return system messages
Default value boolean-true
Type boolean

Returns…

Description An array of all the messages collected according to the search criteria
Type array

Return to the function index for this class Expand: View the source code to this function

array _deal_with_chatcode_tags(string text, string tag, string pm_user, string pm_message, SHORT_TEXT username, ?integer cutoff, ID_TEXT zone, AUTO_LINK room_id, BINARY system_message)

Parse chat code tags (called multiple times, for each tag).

Parameters…

Name text
Description The text we are using
Type string

Name tag
Description The tag name we are parsing
Type string

Name pm_user
Description 1st param
Type string

Name pm_message
Description 2nd param
Type string

Name username
Description The username of who made this chatcode
Type SHORT_TEXT

Name cutoff
Description The maximum number of messages to be returned (NULL: no maximum)
Type ?integer

Name zone
Description The zone that our chat module is in
Type ID_TEXT

Name room_id
Description The room ID the message is in
Type AUTO_LINK

Name system_message
Description Whether this is within a system message
Type BINARY

Returns…

Description A pair: whether the message was deleted, and the new text of the message
Type array

Return to the function index for this class Expand: View the source code to this function

array _deal_with_chatcode_private(string pm_user, string pm_message, SHORT_TEXT username, string text, AUTO_LINK room_id, BINARY system_message)

Parse private message chat code tag.

Parameters…

Name pm_user
Description The member a private message should be sent to
Type string

Name pm_message
Description The private message
Type string

Name username
Description The username of who made this chatcode
Type SHORT_TEXT

Name text
Description The text we are using
Type string

Name room_id
Description The room ID the message is in
Type AUTO_LINK

Name system_message
Description Whether this is within a system message
Type BINARY

Returns…

Description A pair: whether the message was deleted, and the new text of the message
Type array

Return to the function index for this class Expand: View the source code to this function

array _deal_with_chatcode_invite(string pm_user, string pm_message, SHORT_TEXT username, string text, ID_TEXT zone)

Parse invitation chat code tag.

Parameters…

Name pm_user
Description Comma-separated list of members to invite
Type string

Name pm_message
Description The room name
Type string

Name username
Description The username of who made this chatcode
Type SHORT_TEXT

Name text
Description The text we are using
Type string

Name zone
Description The zone the chat module is in
Type ID_TEXT

Returns…

Description A pair: whether the message was deleted, and the new text of the message
Type array

Return to the function index for this class Expand: View the source code to this function

array _deal_with_chatcode_newroom(string pm_user, string pm_message, SHORT_TEXT username, string text, ?integer cutoff)

Parse room creation chat code tag.

Parameters…

Name pm_user
Description The room name
Type string

Name pm_message
Description Comma-separated list of members to allow in
Type string

Name username
Description The username of who made this chatcode
Type SHORT_TEXT

Name text
Description The text we are using
Type string

Name cutoff
Description The maximum number of messages to be returned (NULL: no maximum)
Type ?integer

Returns…

Description A pair: whether the message was deleted, and the new text of the message
Type array

Return to the function index for this class Expand: View the source code to this function

array _remove_empty_messages(array messages, array message_ids)

Remove any messages from the list of messages that aren't mentioned in the list of message IDs.

Parameters…

Name messages
Description Original list of messages
Type array

Name message_ids
Description List of message IDs to keep
Type array

Returns…

Description A new list of messages
Type array

Return to the function index for this class Expand: View the source code to this function

string parse_allow_list_input(string _allow)

Takes a comma-separated list of usernames, split it up, convert all the usernames to IDs, and put it all back together again.

Parameters…

Name _allow
Description A comma-separated list of usernames
Type string

Returns…

Description A comma-separated list of member IDs
Type string

Return to the function index for this class Expand: View the source code to this function

string chat_convert_html_entities(string string)

Takes a chat message, and converts some characters from HTML entities into proper characters.

Parameters…

Name string
Description Chat message to be parsed
Type string

Returns…

Description Parsed chat message
Type string

Return to the function index for this class Expand: View the source code to this function

boolean check_chatroom_access(mixed room, boolean ret, ?MEMBER member_id, boolean must_be_explicit)

Check whether a member has access to the chatroom.

Parameters…

Name room
Description The row of the chat room to check for access OR it's ID (AUTO_LINK)
Type mixed

Name ret
Description Whether to return false if there is no access (as opposed to bombing out)
Default value boolean-false
Type boolean

Name member_id
Description The member to check as (NULL: current member)
Default value
Type ?MEMBER

Name must_be_explicit
Description Whether to also ensure for $member_id having explicit access
Default value boolean-false
Type boolean

Returns…

Description Whether the current member has access to the chatroom
Type boolean

Return to the function index for this class Expand: View the source code to this function

boolean handle_chatroom_pruning(array row)

Prune timed-out private chatrooms.

Parameters…

Name row
Description The row of the chat room to possibly prune
Type array

Returns…

Description Whether the room was pruned
Type boolean

Return to the function index for this class Expand: View the source code to this function

map get_effect_set(boolean only_overridable)

Get the list of all available chat sound effects.

Parameters…

Name only_overridable
Description Map to NULL if it is not overridable.
Default value boolean-false
Type boolean

Returns…

Description All available sound effects (mapping between base code, and actual code).
Type map

Return to the function index for this class Expand: View the source code to this function

array get_effect_settings(boolean full_urls, ?MEMBER for_member, boolean all_members)

Get a list of template mappings for the current member, between sound effect IDs and the URLs to the mp3 fiels.

Parameters…

Name full_urls
Description Whether to use full URLs in the mappings.
Default value boolean-false
Type boolean

Name for_member
Description Get settings overridden for this specific member (NULL: global settings).
Default value
Type ?MEMBER

Name all_members
Description Get global settings and settings overridden for all members (if this is true we'd expect $for_member to be NULL).
Default value boolean-false
Type boolean

Returns…

Description The template mappings.
Type array

Return to the function index for this class Expand: View the source code to this function

tempcode get_chat_sound_tpl()

Get a template that will set up the chat sound effects as for what this member needs.

Parameters…

Returns…

Description Template to set up chat sound effects.
Type tempcode

Return to the function index for this class Expand: View the source code to this function

sources/chat2.php

Global_functions_chat2.php

Function summary

void blocking_add (MEMBER blocker, MEMBER blocked, ?TIME time)
void blocking_remove (MEMBER blocker, MEMBER blocked)
void buddy_add (MEMBER likes, MEMBER liked, ?TIME time)
void buddy_remove (MEMBER likes, MEMBER liked)
tempcode get_chatroom_fields (boolean is_made_by_me, SHORT_TEXT room_name, LONG_TEXT welcome, SHORT_TEXT username, LONG_TEXT allow2, LONG_TEXT allow2_groups, LONG_TEXT disallow2, LONG_TEXT disallow2_groups)
array read_in_chat_perm_fields ()
AUTO_LINK add_chatroom (SHORT_TEXT welcome, SHORT_TEXT roomname, MEMBER room_owner, LONG_TEXT allow2, LONG_TEXT allow2_groups, LONG_TEXT disallow2, LONG_TEXT disallow2_groups, LANGUAGE_NAME roomlang, BINARY is_im)
void edit_chatroom (AUTO_LINK id, SHORT_TEXT welcome, SHORT_TEXT roomname, MEMBER room_owner, LONG_TEXT allow2, LONG_TEXT allow2_groups, LONG_TEXT disallow2, LONG_TEXT disallow2_groups, LANGUAGE_NAME roomlang)
void delete_chatroom (AUTO_LINK id)
void delete_chat_messages (array where)
void delete_all_chatrooms ()
void chatroom_ban_to (MEMBER member_id, AUTO_LINK id)
void chatroom_unban_to (MEMBER member_id, AUTO_LINK id)
void delete_chatroom_messages (AUTO_LINK id)

void blocking_add(MEMBER blocker, MEMBER blocked, ?TIME time)

Block a member.

Parameters…

Name blocker
Description The member blocking
Type MEMBER

Name blocked
Description The member being blocked
Type MEMBER

Name time
Description The logged time of the block (NULL: now)
Default value
Type ?TIME

(No return value)


Return to the function index for this class Expand: View the source code to this function

void blocking_remove(MEMBER blocker, MEMBER blocked)

Unblock a member.

Parameters…

Name blocker
Description The member unblocking
Type MEMBER

Name blocked
Description The member being unblocked
Type MEMBER

(No return value)


Return to the function index for this class Expand: View the source code to this function

void buddy_add(MEMBER likes, MEMBER liked, ?TIME time)

Add a buddy.

Parameters…

Name likes
Description The member befriending
Type MEMBER

Name liked
Description The member being befriended
Type MEMBER

Name time
Description The logged time of the friendship (NULL: now)
Default value
Type ?TIME

(No return value)


Return to the function index for this class Expand: View the source code to this function

void buddy_remove(MEMBER likes, MEMBER liked)

Remove ('dump') a buddy.

Parameters…

Name likes
Description The member befriending
Type MEMBER

Name liked
Description The member being dumped
Type MEMBER

(No return value)


Return to the function index for this class Expand: View the source code to this function

tempcode get_chatroom_fields(boolean is_made_by_me, SHORT_TEXT room_name, LONG_TEXT welcome, SHORT_TEXT username, LONG_TEXT allow2, LONG_TEXT allow2_groups, LONG_TEXT disallow2, LONG_TEXT disallow2_groups)

Get form fields for adding/editing a chatroom.

Parameters…

Name is_made_by_me
Description Whether the room is being made as a private room by the current member
Default value boolean-false
Type boolean

Name room_name
Description The room name
Default value
Type SHORT_TEXT

Name welcome
Description The welcome message
Default value
Type LONG_TEXT

Name username
Description The owner username
Default value
Type SHORT_TEXT

Name allow2
Description The comma-separated list of users that may access it (blank: no restriction)
Default value
Type LONG_TEXT

Name allow2_groups
Description The comma-separated list of usergroups that may access it (blank: no restriction)
Default value
Type LONG_TEXT

Name disallow2
Description The comma-separated list of users that may NOT access it (blank: no restriction)
Default value
Type LONG_TEXT

Name disallow2_groups
Description The comma-separated list of usergroups that may NOT access it (blank: no restriction)
Default value
Type LONG_TEXT

Returns…

Description The fields
Type tempcode

Return to the function index for this class Expand: View the source code to this function

array read_in_chat_perm_fields()

Read in chat permission fields, from the complex posted data.

Parameters…

Returns…

Description A tuple of permission fields
Type array

Return to the function index for this class Expand: View the source code to this function

AUTO_LINK add_chatroom(SHORT_TEXT welcome, SHORT_TEXT roomname, MEMBER room_owner, LONG_TEXT allow2, LONG_TEXT allow2_groups, LONG_TEXT disallow2, LONG_TEXT disallow2_groups, LANGUAGE_NAME roomlang, BINARY is_im)

Add a chatroom.

Parameters…

Name welcome
Description The welcome message
Type SHORT_TEXT

Name roomname
Description The room name
Type SHORT_TEXT

Name room_owner
Description The room owner
Type MEMBER

Name allow2
Description The comma-separated list of users that may access it (blank: no restriction)
Type LONG_TEXT

Name allow2_groups
Description The comma-separated list of usergroups that may access it (blank: no restriction)
Type LONG_TEXT

Name disallow2
Description The comma-separated list of users that may NOT access it (blank: no restriction)
Type LONG_TEXT

Name disallow2_groups
Description The comma-separated list of usergroups that may NOT access it (blank: no restriction)
Type LONG_TEXT

Name roomlang
Description The room language
Type LANGUAGE_NAME

Name is_im
Description Whether it is an IM room
Default value 0
Type BINARY

Returns…

Description The chat room ID
Type AUTO_LINK

Return to the function index for this class Expand: View the source code to this function

void edit_chatroom(AUTO_LINK id, SHORT_TEXT welcome, SHORT_TEXT roomname, MEMBER room_owner, LONG_TEXT allow2, LONG_TEXT allow2_groups, LONG_TEXT disallow2, LONG_TEXT disallow2_groups, LANGUAGE_NAME roomlang)

Edit a chatroom.

Parameters…

Name id
Description The chat room ID
Type AUTO_LINK

Name welcome
Description The welcome message
Type SHORT_TEXT

Name roomname
Description The room name
Type SHORT_TEXT

Name room_owner
Description The room owner
Type MEMBER

Name allow2
Description The comma-separated list of users that may access it (blank: no restriction)
Type LONG_TEXT

Name allow2_groups
Description The comma-separated list of usergroups that may access it (blank: no restriction)
Type LONG_TEXT

Name disallow2
Description The comma-separated list of users that may NOT access it (blank: no restriction)
Type LONG_TEXT

Name disallow2_groups
Description The comma-separated list of usergroups that may NOT access it (blank: no restriction)
Type LONG_TEXT

Name roomlang
Description The room language
Type LANGUAGE_NAME

(No return value)


Return to the function index for this class Expand: View the source code to this function

void delete_chatroom(AUTO_LINK id)

Delete a chatroom.

Parameters…

Name id
Description The chat room ID
Type AUTO_LINK

(No return value)


Return to the function index for this class Expand: View the source code to this function

void delete_chat_messages(array where)

Delete chat messages.

Parameters…

Name where
Description Where query to specify what to delete
Type array

(No return value)


Return to the function index for this class Expand: View the source code to this function

void delete_all_chatrooms()

Delete all chatrooms.

Parameters…

(No return value)


Return to the function index for this class Expand: View the source code to this function

void chatroom_ban_to(MEMBER member_id, AUTO_LINK id)

Ban a member from a chatroom.

Parameters…

Name member_id
Description The member to ban
Type MEMBER

Name id
Description The chat room ID
Type AUTO_LINK

(No return value)


Return to the function index for this class Expand: View the source code to this function

void chatroom_unban_to(MEMBER member_id, AUTO_LINK id)

Unban a member from a chatroom.

Parameters…

Name member_id
Description The member to unban
Type MEMBER

Name id
Description The chat room ID
Type AUTO_LINK

(No return value)


Return to the function index for this class Expand: View the source code to this function

void delete_chatroom_messages(AUTO_LINK id)

Delete all messages in a chatroom.

Parameters…

Name id
Description The chat room ID
Type AUTO_LINK

(No return value)


Return to the function index for this class Expand: View the source code to this function