Edit aliasRequest
From TrillWiki
When a registered alias is entered in by the user, this notification will be generated.
Compatibility: 1.0 and higher
Contents |
Syntax
callback(int window_id, char *icontrol, alias_request_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
Edit aliasRequest utilitizes the alias_request_t structure.
struct alias_request_t
{
unsigned int struct_size;
int alias_id;
char *alias;
char *text;
/* 2.0
*/
char *formatted_text;
char *medium;
int connection_id;
int window_id;
};
- alias_id
- The alias ID returned when the alias was registered.
- alias
- The alias itself, such as "music" in /music
- text
- The full line of text that was used, such as "/music stop". This is also used for the returned text. If this value is set to NULL the alias will not be changed, if it is set to text it will send that text instead of the alias line.
Return Value
If the plugin returns 1, no text will be sent to the user. If a 0 is returned, the text specified in the text parameter will be sent.
Remarks
If text is provided, be sure not to unallocate the memory for it until you receive an edit_aliasFree notification.
See also: edit_aliasFree
