1
0
mirror of https://github.com/irssi/irssi.git synced 2024-12-04 14:46:39 -05:00

Added $versiontime and Irssi::version_time()

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2257 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2001-12-15 23:26:09 +00:00 committed by cras
parent 3007e251a6
commit 7bda808395
2 changed files with 17 additions and 1 deletions

View File

@ -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,

View File

@ -445,6 +445,13 @@ CODE:
OUTPUT:
RETVAL
int
version_time()
CODE:
RETVAL = IRSSI_VERSION_TIME;
OUTPUT:
RETVAL
#*******************************
MODULE = Irssi::Core PACKAGE = Irssi::Server
#*******************************