MessageIndividualUpdate

From TrillWiki

Jump to: navigation, search

The messageIndividualUpdate function allows a medium plugin to change a message already displayed in the message window, or alter it in the message history.

Compatibility: 3.0 and higher

Contents

Syntax

plugin_send(MYGUID,"messageIndividualUpdate",message_t *);

Note that all Trillian functions and notifications begin with a lower-case letter, despite the Wiki requirement that all pages start with a capital letter.

Parameters

MessageIndividualUpdate utilitizes the message_t structure.

struct message_t
{
    unsigned int                struct_size;

    char                        *medium;
    int                         connection_id;

    char                        *name;
    char                        *type;
    char                        *text;

    char                        *location;

    void                        *extra_information;
    
    /* 2.0 
     */
    int                         window_id;
    unsigned int                extra_information_size;
    unsigned int                time_stamp;

    char                        *display_name;
    char                        *section;

    /* 3.0
     */
    struct capability_t         *capability_list;
    int                         text_len;
    int                         message_id;
};



connection_id
The connection id of the window.
window_id
The window id of the window. If this is 0, the other variables are used to locate the window.
medium
The medium of the window.
name
The name associated with the window.
location
The chat window name. If this is not a multi-person chat, leave this as NULL.
message_id
The unique identifier of the message, returned from messageReceive.
text
The text to change the message to. See remarks below.


Return Value

This function returns 0 on success, or a negative value if unable to find the message or alter it.

Remarks

The text parameter should not be set to NULL. If you wish make the message blank, set text to a zero-length string.


Personal tools