mirror of
https://github.com/weechat/weechat.git
synced 2026-07-02 07:46:38 +02:00
api: add time in info "date" (WeeChat compilation date/time) (closes #1138)
This commit is contained in:
@@ -134,3 +134,16 @@ version_get_compilation_time ()
|
||||
{
|
||||
return __TIME__;
|
||||
}
|
||||
|
||||
/*
|
||||
* Returns date/time of WeeChat compilation.
|
||||
*
|
||||
* Example:
|
||||
* Dec 16 2012 18:10:22
|
||||
*/
|
||||
|
||||
const char *
|
||||
version_get_compilation_date_time ()
|
||||
{
|
||||
return __DATE__ " " __TIME__;
|
||||
}
|
||||
|
||||
@@ -27,5 +27,6 @@ extern const char *version_get_git ();
|
||||
extern const char *version_get_version_with_git ();
|
||||
extern const char *version_get_compilation_date ();
|
||||
extern const char *version_get_compilation_time ();
|
||||
extern const char *version_get_compilation_date_time ();
|
||||
|
||||
#endif /* WEECHAT_VERSION_H */
|
||||
|
||||
@@ -388,7 +388,7 @@ plugin_api_info_date_cb (const void *pointer, void *data,
|
||||
(void) info_name;
|
||||
(void) arguments;
|
||||
|
||||
return version_get_compilation_date ();
|
||||
return version_get_compilation_date_time ();
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1905,7 +1905,7 @@ plugin_api_init ()
|
||||
"release)"),
|
||||
NULL, &plugin_api_info_version_git_cb, NULL, NULL);
|
||||
hook_info (NULL, "date",
|
||||
N_("WeeChat compilation date"),
|
||||
N_("WeeChat compilation date/time"),
|
||||
NULL, &plugin_api_info_date_cb, NULL, NULL);
|
||||
hook_info (NULL, "pid",
|
||||
N_("WeeChat PID (process ID)"),
|
||||
|
||||
Reference in New Issue
Block a user