diff --git a/src/core/expandos.c b/src/core/expandos.c index 25d407db..a0719865 100644 --- a/src/core/expandos.c +++ b/src/core/expandos.c @@ -360,13 +360,20 @@ static char *expando_target(SERVER_REC *server, void *item, int *free_ret) return item == NULL ? "" : ((WI_ITEM_REC *) item)->name; } -/* client release date (numeric version string) */ +/* client release date (in YYYYMMDD format) */ static char *expando_releasedate(SERVER_REC *server, void *item, int *free_ret) { *free_ret = TRUE; return g_strdup_printf("%d", IRSSI_VERSION_DATE); } +/* client release time (in HHMM format) */ +static char *expando_releasetime(SERVER_REC *server, void *item, int *free_ret) +{ + *free_ret = TRUE; + return g_strdup_printf("%d", IRSSI_VERSION_TIME); +} + /* current working directory */ static char *expando_workdir(SERVER_REC *server, void *item, int *free_ret) { @@ -585,6 +592,8 @@ void expandos_init(void) "window item changed", EXPANDO_ARG_WINDOW, NULL); expando_create("V", expando_releasedate, "", EXPANDO_NEVER, NULL); + expando_create("versiontime", expando_releasetime, + "", EXPANDO_NEVER, NULL); expando_create("W", expando_workdir, NULL); expando_create("Y", expando_realname, "window changed", EXPANDO_ARG_NONE, diff --git a/src/perl/common/Core.xs b/src/perl/common/Core.xs index cf01de40..864eeb3f 100644 --- a/src/perl/common/Core.xs +++ b/src/perl/common/Core.xs @@ -445,6 +445,13 @@ CODE: OUTPUT: RETVAL +int +version_time() +CODE: + RETVAL = IRSSI_VERSION_TIME; +OUTPUT: + RETVAL + #******************************* MODULE = Irssi::Core PACKAGE = Irssi::Server #*******************************