diff options
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/pc.c | 11 | ||||
-rw-r--r-- | src/map/script.c | 6 |
2 files changed, 12 insertions, 5 deletions
diff --git a/src/map/pc.c b/src/map/pc.c index 1bc37040e..e544fdd53 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -1058,9 +1058,16 @@ bool pc_authok(struct map_session_data *sd, int login_id2, time_t expiration_tim if( !changing_mapservers ) { - if (battle_config.display_version == 1){ + if (battle_config.display_version == 1) { + const char* svn = get_svn_revision(); + const char* git = get_git_hash(); char buf[256]; - sprintf(buf, "SVN version: %s", get_svn_revision()); + if( git[0] != HERC_UNKNOWN_VER ) + sprintf(buf,"Git Hash: %s", git); + else if( svn[0] != HERC_UNKNOWN_VER ) + sprintf(buf,"SVN Revision: %s", svn); + else + sprintf(buf,"Unknown Version"); clif_displaymessage(sd->fd, buf); } diff --git a/src/map/script.c b/src/map/script.c index 83b6c1a68..fe00599a6 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -16992,10 +16992,10 @@ BUILDIN_FUNC(is_function) { * get_revision() -> retrieves the current svn revision (if available) **/ BUILDIN_FUNC(get_revision) { - const char * revision; + const char *svn = get_svn_revision(); - if ( (revision = get_svn_revision()) != 0 ) - script_pushint(st,atoi(revision)); + if ( svn[0] != HERC_UNKNOWN_VER ) + script_pushint(st,atoi(svn)); else script_pushint(st,-1);//unknown |