diff options
author | Diogo Sousa <diogogsousa@gmail.com> | 2013-07-09 20:21:16 +0100 |
---|---|---|
committer | Diogo Sousa <diogogsousa@gmail.com> | 2013-07-09 20:21:16 +0100 |
commit | 798db7368a2df832924be1f28c9720ae6bc60236 (patch) | |
tree | ecc1d602507e7694f43054a6d27d10c514433ea3 /src/common/plugin.h | |
parent | 1544a5d6cb4e44af23c0c2354d0fc6cb1b404460 (diff) |
Added hexchat_hook_server_attrs() and hexchat_hook_print_attrs() to the plugin
interface. This hooks are similar to hexchat_hook_{server,print}() except the callback passes an extra argument with the (new) structure hexchat_event_attrs. This structure contains attributes related to the event; by now it only contains the server_time_utc member which is non-zero if server-time is enabled and the server used this extension to pass a timestamp. See issue #661. (Note: this hooks are still not called by hexchat in this commit.)
Diffstat (limited to 'src/common/plugin.h')
-rw-r--r-- | src/common/plugin.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/common/plugin.h b/src/common/plugin.h index dd878895..d299e5af 100644 --- a/src/common/plugin.h +++ b/src/common/plugin.h @@ -132,6 +132,18 @@ struct _hexchat_plugin const char *var); int (*hexchat_pluginpref_list) (hexchat_plugin *ph, char *dest); + hexchat_hook *(*hexchat_hook_server_attrs) (hexchat_plugin *ph, + const char *name, + int pri, + int (*callback) (char *word[], char *word_eol[], + hexchat_event_attrs *attrs, void *user_data), + void *userdata); + hexchat_hook *(*hexchat_hook_print_attrs) (hexchat_plugin *ph, + const char *name, + int pri, + int (*callback) (char *word[], hexchat_event_attrs *attrs, + void *user_data), + void *userdata); void *(*hexchat_dummy4) (hexchat_plugin *ph); void *(*hexchat_dummy3) (hexchat_plugin *ph); void *(*hexchat_dummy2) (hexchat_plugin *ph); @@ -156,7 +168,10 @@ void plugin_kill_all (void); void plugin_auto_load (session *sess); int plugin_emit_command (session *sess, char *name, char *word[], char *word_eol[]); int plugin_emit_server (session *sess, char *name, char *word[], char *word_eol[]); +int plugin_emit_server_attr (session *sess, char *name, char *word[], + char *word_eol[], time_t server_time); int plugin_emit_print (session *sess, char *word[]); +int plugin_emit_print_attr (session *sess, char *word[], time_t server_time); int plugin_emit_dummy_print (session *sess, char *name); int plugin_emit_keypress (session *sess, unsigned int state, unsigned int keyval, int len, char *string); GList* plugin_command_list(GList *tmp_list); |