summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-04-06 21:01:22 -0300
committershennetsind <ind@henn.et>2013-04-06 21:01:22 -0300
commit27dccdda376b242d142bc549b74deea26773bde9 (patch)
tree12b4db81e4014caaa1f044da658d4f5d8415dee1 /src/map
parent16dfef6c5fe28d9008a304d4f5f650d7ac1dfbcd (diff)
downloadhercules-27dccdda376b242d142bc549b74deea26773bde9.tar.gz
hercules-27dccdda376b242d142bc549b74deea26773bde9.tar.bz2
hercules-27dccdda376b242d142bc549b74deea26773bde9.tar.xz
hercules-27dccdda376b242d142bc549b74deea26773bde9.zip
Fixed @version
Added existent Hybrid GIT/SVN support to @version. Special Thanks to Zopokx for pointing it out. Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map')
-rw-r--r--src/map/atcommand.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index d878de709..7fc998628 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -7369,15 +7369,18 @@ ACMD_FUNC(whereis)
return 0;
}
-ACMD_FUNC(version)
-{
- const char * revision;
+ACMD_FUNC(version) {
+ const char *git = get_git_hash();
+ const char *svn = get_svn_revision();
- if ((revision = get_svn_revision()) != 0) {
- sprintf(atcmd_output,msg_txt(1295),revision); // rAthena Version SVN r%s
+ if ( git[0] != HERC_UNKNOWN_VER ) {
+ sprintf(atcmd_output,msg_txt(1295),git); // Git Hash '%s'
+ clif->message(fd,atcmd_output);
+ } else if ( svn[0] != HERC_UNKNOWN_VER ) {
+ sprintf(atcmd_output,msg_txt(1436),git); // SVN r%s
clif->message(fd,atcmd_output);
} else
- clif->message(fd,msg_txt(1296)); // Cannot determine SVN revision.
+ clif->message(fd,msg_txt(1296)); // Cannot determine version
return 0;
}