Skip to content
This repository was archived by the owner on May 24, 2024. It is now read-only.

Commit 64ab23a

Browse files
committed
Update hexchat-plugin.h
1 parent 5cb5ef8 commit 64ab23a

1 file changed

Lines changed: 50 additions & 0 deletions

File tree

win32/hexchat-plugin.h

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ typedef struct _hexchat_hook hexchat_hook;
4949
#ifndef PLUGIN_C
5050
typedef struct _hexchat_context hexchat_context;
5151
#endif
52+
typedef struct
53+
{
54+
time_t server_time_utc; /* 0 if not used */
55+
} hexchat_event_attrs;
5256

5357
#ifndef PLUGIN_C
5458
struct _hexchat_plugin
@@ -164,6 +168,23 @@ struct _hexchat_plugin
164168
const char *var);
165169
int (*hexchat_pluginpref_list) (hexchat_plugin *ph,
166170
char *dest);
171+
hexchat_hook *(*hexchat_hook_server_attrs) (hexchat_plugin *ph,
172+
const char *name,
173+
int pri,
174+
int (*callback) (char *word[], char *word_eol[],
175+
hexchat_event_attrs *attrs, void *user_data),
176+
void *userdata);
177+
hexchat_hook *(*hexchat_hook_print_attrs) (hexchat_plugin *ph,
178+
const char *name,
179+
int pri,
180+
int (*callback) (char *word[], hexchat_event_attrs *attrs,
181+
void *user_data),
182+
void *userdata);
183+
int (*hexchat_emit_print_attrs) (hexchat_plugin *ph, hexchat_event_attrs *attrs,
184+
const char *event_name, ...);
185+
hexchat_event_attrs *(*hexchat_event_attrs_create) (hexchat_plugin *ph);
186+
void (*hexchat_event_attrs_free) (hexchat_plugin *ph,
187+
hexchat_event_attrs *attrs);
167188
};
168189
#endif
169190

@@ -176,20 +197,40 @@ hexchat_hook_command (hexchat_plugin *ph,
176197
const char *help_text,
177198
void *userdata);
178199

200+
hexchat_event_attrs *hexchat_event_attrs_create (hexchat_plugin *ph);
201+
202+
void hexchat_event_attrs_free (hexchat_plugin *ph, hexchat_event_attrs *attrs);
203+
179204
hexchat_hook *
180205
hexchat_hook_server (hexchat_plugin *ph,
181206
const char *name,
182207
int pri,
183208
int (*callback) (char *word[], char *word_eol[], void *user_data),
184209
void *userdata);
185210

211+
hexchat_hook *
212+
hexchat_hook_server_attrs (hexchat_plugin *ph,
213+
const char *name,
214+
int pri,
215+
int (*callback) (char *word[], char *word_eol[],
216+
hexchat_event_attrs *attrs, void *user_data),
217+
void *userdata);
218+
186219
hexchat_hook *
187220
hexchat_hook_print (hexchat_plugin *ph,
188221
const char *name,
189222
int pri,
190223
int (*callback) (char *word[], void *user_data),
191224
void *userdata);
192225

226+
hexchat_hook *
227+
hexchat_hook_print_attrs (hexchat_plugin *ph,
228+
const char *name,
229+
int pri,
230+
int (*callback) (char *word[], hexchat_event_attrs *attrs,
231+
void *user_data),
232+
void *userdata);
233+
193234
hexchat_hook *
194235
hexchat_hook_timer (hexchat_plugin *ph,
195236
int timeout,
@@ -297,6 +338,10 @@ int
297338
hexchat_emit_print (hexchat_plugin *ph,
298339
const char *event_name, ...);
299340

341+
int
342+
hexchat_emit_print_attrs (hexchat_plugin *ph, hexchat_event_attrs *attrs,
343+
const char *event_name, ...);
344+
300345
char *
301346
hexchat_gettext (hexchat_plugin *ph,
302347
const char *msgid);
@@ -350,8 +395,12 @@ hexchat_pluginpref_list (hexchat_plugin *ph,
350395
#define HEXCHAT_PLUGIN_HANDLE (ph)
351396
#endif
352397
#define hexchat_hook_command ((HEXCHAT_PLUGIN_HANDLE)->hexchat_hook_command)
398+
#define hexchat_event_attrs_create ((HEXCHAT_PLUGIN_HANDLE)->hexchat_event_attrs_create)
399+
#define hexchat_event_attrs_free ((HEXCHAT_PLUGIN_HANDLE)->hexchat_event_attrs_free)
353400
#define hexchat_hook_server ((HEXCHAT_PLUGIN_HANDLE)->hexchat_hook_server)
401+
#define hexchat_hook_server_attrs ((HEXCHAT_PLUGIN_HANDLE)->hexchat_hook_server_attrs)
354402
#define hexchat_hook_print ((HEXCHAT_PLUGIN_HANDLE)->hexchat_hook_print)
403+
#define hexchat_hook_print_attrs ((HEXCHAT_PLUGIN_HANDLE)->hexchat_hook_print_attrs)
355404
#define hexchat_hook_timer ((HEXCHAT_PLUGIN_HANDLE)->hexchat_hook_timer)
356405
#define hexchat_hook_fd ((HEXCHAT_PLUGIN_HANDLE)->hexchat_hook_fd)
357406
#define hexchat_unhook ((HEXCHAT_PLUGIN_HANDLE)->hexchat_unhook)
@@ -374,6 +423,7 @@ hexchat_pluginpref_list (hexchat_plugin *ph,
374423
#define hexchat_plugingui_add ((HEXCHAT_PLUGIN_HANDLE)->hexchat_plugingui_add)
375424
#define hexchat_plugingui_remove ((HEXCHAT_PLUGIN_HANDLE)->hexchat_plugingui_remove)
376425
#define hexchat_emit_print ((HEXCHAT_PLUGIN_HANDLE)->hexchat_emit_print)
426+
#define hexchat_emit_print_attrs ((HEXCHAT_PLUGIN_HANDLE)->hexchat_emit_print_attrs)
377427
#define hexchat_list_time ((HEXCHAT_PLUGIN_HANDLE)->hexchat_list_time)
378428
#define hexchat_gettext ((HEXCHAT_PLUGIN_HANDLE)->hexchat_gettext)
379429
#define hexchat_send_modes ((HEXCHAT_PLUGIN_HANDLE)->hexchat_send_modes)

0 commit comments

Comments
 (0)