EventsGenerate

From TrillWiki

Jump to: navigation, search

The eventsGenerate function will generate an event. There are two types of events to generate. Either a discrete one time event, or a pending event that will wait to be executed to finish.

Compatibility: 2.0 and higher

Contents

Syntax

plugin_send(MYGUID, "eventsGenerate", struct event_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

EventsGenerate utilitizes the event_t structure.

struct event_t {  
 	unsigned int			struct_size; 
 								 
 	char				*type; 
 	char				*description; 
 								 
 	int				discrete; 
 	int				event_id; 
 	 
 	struct event_variables_t	*variables; 
 };


type
The event to generate.
discrete
A discrete event (1) will happen and go away instantly. If this is set to 0, then it will last until it is executed (either using the eventsExecute command or through the events button).
variables
The variables to send along with the event.


Return Value

Negative value on error, event id on success.

Remarks

None.