summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/plugin.c1
-rw-r--r--src/plugins/weechat-plugin.h5
2 files changed, 5 insertions, 1 deletions
diff --git a/src/plugins/plugin.c b/src/plugins/plugin.c
index 1a7be2737..12edccb3f 100644
--- a/src/plugins/plugin.c
+++ b/src/plugins/plugin.c
@@ -695,6 +695,7 @@ plugin_load (const char *filename, int init_plugin, int argc, char **argv)
new_plugin->util_timeval_add = &util_timeval_add;
new_plugin->util_get_time_string = &util_get_time_string;
new_plugin->util_strftimeval = &util_strftimeval;
+ new_plugin->util_parse_time = &util_parse_time;
new_plugin->util_version_number = &util_version_number;
new_plugin->list_new = &weelist_new;
diff --git a/src/plugins/weechat-plugin.h b/src/plugins/weechat-plugin.h
index 6647494e0..ad45ebe5c 100644
--- a/src/plugins/weechat-plugin.h
+++ b/src/plugins/weechat-plugin.h
@@ -68,7 +68,7 @@ struct timeval;
* please change the date with current one; for a second change at same
* date, increment the 01, otherwise please keep 01.
*/
-#define WEECHAT_PLUGIN_API_VERSION "20231226-01"
+#define WEECHAT_PLUGIN_API_VERSION "20240105-01"
/* macros for defining plugin infos */
#define WEECHAT_PLUGIN_NAME(__name) \
@@ -439,6 +439,7 @@ struct t_weechat_plugin
const char *(*util_get_time_string) (const time_t *date);
int (*util_strftimeval) (char *string, int max, const char *format,
struct timeval *tv);
+ int (*util_parse_time) (const char *datetime, struct timeval *tv);
int (*util_version_number) (const char *version);
/* sorted lists */
@@ -1499,6 +1500,8 @@ extern int weechat_plugin_end (struct t_weechat_plugin *plugin);
(weechat_plugin->util_get_time_string)(__date)
#define weechat_util_strftimeval(__string, __max, __format, __tv) \
(weechat_plugin->util_strftimeval)(__string, __max, __format, __tv)
+#define weechat_util_parse_time(__datetime, __tv) \
+ (weechat_plugin->util_parse_time)(__datetime, __tv)
#define weechat_util_version_number(__version) \
(weechat_plugin->util_version_number)(__version)