Events statusChange

From TrillWiki

Jump to: navigation, search

The events_statusChange notification is sent when the user selects an away message or an away message is triggered by another event. The medium plugins associated with that away message will receive this notification.

Compatibility: 2.0 and higher

Contents

Syntax

callback(int window_id, char *icontrol, "events_statusChange", event_status_t *data, void *userData);

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

Events statusChange utilitizes the event_status_t structure.

struct event_status_t {  
      unsigned int                            struct_size; 
   
      char                                    *medium; 
      char                                    *status; 
      char                                    *text; 

       int                                     auto_respond; 
       int                                     automatic; 
};



medium
The medium.
status
The status to change to.
text
Auto response text associated with the status (not all mediums may be able to use this field).
auto_respond
Whether or not to use the above text as an autoresponse.
automatic
Whether or not this status change was initiated by the user or automatically by another event. The plugin should not change to an automatic state if its currently in a user initiated status state. An example would be if a user sets themselves to "out to lunch", leaves the computer, and then the idle event is triggered automatically. The user did not intend to have his state change to idle when they explicitly set themselves away. Likewise, when they return and a back event is triggered, they most likely do not want to be set back until they explicitly set themselves back.


Return Value

Must return 0.

Remarks

Please note the automatic variable within this structure.