summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2001-12-15 23:26:09 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2001-12-15 23:26:09 +0000
commit7bda8083954d46145a174028d99922677451ef4f (patch)
treecdebcf530bcf2da16e5ac2a1fd1fe86b7fd002f5 /src/core
parent3007e251a6bbe83f667d5366d45f7253cd7b8f6b (diff)
downloadirssi-7bda8083954d46145a174028d99922677451ef4f.zip
Added $versiontime and Irssi::version_time()
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2257 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/core')
-rw-r--r--src/core/expandos.c11
1 files changed, 10 insertions, 1 deletions
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,