...
 
Commits (3)
/* Synchronet "@code" functions */
// vi: tabstop=4
/* $Id: atcodes.cpp,v 1.142 2020/05/10 20:12:35 rswindell Exp $ */
/****************************************************************************
* @format.tab-size 4 (Plain Text/Source Code File Header) *
......@@ -16,21 +13,9 @@
* See the GNU General Public License for more details: gpl.txt or *
* http://www.fsf.org/copyleft/gpl.html *
* *
* Anonymous FTP access to the most recent released source is available at *
* ftp://vert.synchro.net, ftp://cvs.synchro.net and ftp://ftp.synchro.net *
* *
* Anonymous CVS access to the development source and modification history *
* is available at cvs.synchro.net:/cvsroot/sbbs, example: *
* cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs login *
* (just hit return, no password is necessary) *
* cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs checkout src *
* *
* For Synchronet coding style and modification guidelines, see *
* http://www.synchro.net/source.html *
* *
* You are encouraged to submit any modifications (preferably in Unix diff *
* format) via e-mail to mods@synchro.net *
* *
* Note: If this box doesn't appear square, then you need to fix your tabs. *
****************************************************************************/
......@@ -39,6 +24,7 @@
#include "utf8.h"
#include "unicode.h"
#include "cp437defs.h"
#include "ver.h"
#if defined(_WINSOCKAPI_)
extern WSADATA WSAData;
......@@ -411,6 +397,12 @@ const char* sbbs_t::atcode(char* sp, char* str, size_t maxlen, long* pmode, bool
return(str);
}
if(strcmp(sp, "GIT_HASH") == 0)
return git_hash;
if(strcmp(sp, "GIT_BRANCH") == 0)
return git_branch;
if(!strcmp(sp,"UPTIME")) {
extern volatile time_t uptime;
time_t up=0;
......
......@@ -21,6 +21,7 @@
#include "sbbs.h"
#include "js_request.h"
#include "ver.h"
#ifdef JAVASCRIPT
......@@ -529,6 +530,8 @@ static char* sys_prop_desc[] = {
,"Synchronet version notice (includes version and platform)"
,"Synchronet version number in decimal (e.g. 31301 for v3.13b)"
,"Synchronet version number in hexadecimal (e.g. 0x31301 for v3.13b)"
,"Synchronet Git repository branch name"
,"Synchronet Git repository commit hash"
,"platform description (e.g. 'Win32', 'Linux', 'FreeBSD')"
,"architecture description (e.g. 'i386', 'i686', 'x86_64')"
,"message base library version information"
......@@ -2475,6 +2478,10 @@ static JSBool js_system_resolve(JSContext *cx, JSObject *obj, jsid id)
LAZY_INTEGER("version_num", VERSION_NUM);
LAZY_INTEGER("version_hex", VERSION_HEX);
/* Git repo details */
LAZY_STRING("git_branch", git_branch);
LAZY_STRING("git_hash", git_hash);
LAZY_STRING("platform", PLATFORM_DESC);
LAZY_STRING("architecture", ARCHITECTURE_DESC);
LAZY_STRFUNC("msgbase_lib", sprintf(str,"SMBLIB %s",smb_lib_ver()), str);
......
......@@ -1439,12 +1439,6 @@ extern char lastuseron[LEN_ALIAS+1]; /* Name of user last online */
}
#endif
extern
#ifdef __cplusplus
"C"
#endif
const char* beta_version;
/* Global data */
/* ToDo: These should be hunted down and killed */
......
......@@ -66,10 +66,10 @@ const char * const text_defaults[TOTAL_TEXT]={
,"\x07\x01\x5f\x01\x77\x01\x68\x4e\x6f\x64\x65\x20\x25\x32\x64\x3a\x20\x01\x67\x25\x73\x01\x6e\x01\x67\x20\x73\x65\x6e\x74\x20\x79"
"\x6f\x75\x20\x45\x2d\x6d\x61\x69\x6c\x2e\x0d\x0a" // 038 EmailNodeMsg
,"\x01\x6e\x0d\x0a\x59\x6f\x75\x20\x63\x61\x6e\x27\x74\x20\x66\x6f\x72\x77\x61\x72\x64\x20\x6d\x61\x69\x6c\x2e\x0d\x0a" // 039 R_Forward
,"\x01\x6e\x01\x6d\x0d\x0a\x46\x6f\x72\x77\x61\x72\x64\x65\x64\x20\x62\x79\x20\x01\x68\x25\x73\x01\x6e\x01\x6d\x20\x6f\x6e\x20\x01"
"\x68\x25\x73\x01\x6e\x0d\x0a" // 040 ForwardedFrom
,"\x01\x6e\x01\x6d\x0d\x0a\x4d\x61\x69\x6c\x20\x66\x6f\x72\x77\x61\x72\x64\x65\x64\x20\x74\x6f\x20\x01\x68\x25\x73\x20\x01\x6e\x01"
"\x6d\x23\x25\x64\x2e\x01\x6e\x0d\x0a" // 041 Forwarded
,"\x01\x6e\x01\x6d\x46\x6f\x72\x77\x61\x72\x64\x65\x64\x20\x62\x79\x20\x01\x68\x25\x73\x01\x6e\x01\x6d\x20\x6f\x6e\x20\x01\x68\x25"
"\x73\x01\x6e\x0d\x0a" // 040 ForwardedFrom
,"\x01\x6e\x01\x6d\x0d\x0a\x4d\x61\x69\x6c\x20\x66\x6f\x72\x77\x61\x72\x64\x65\x64\x20\x74\x6f\x20\x01\x68\x25\x73\x01\x6e\x0d\x0a"
"" // 041 Forwarded
,"\x01\x62\x01\x68\x41\x75\x74\x6f\x20\x6d\x65\x73\x73\x61\x67\x65\x20\x62\x79\x3a\x20\x01\x63\x25\x73\x01\x62\x20\x6f\x6e\x20\x25"
"\x73\x01\x6e\x0d\x0a\x0d\x0a" // 042 AutoMsgBy
,"\x0d\x0a\x41\x75\x74\x6f\x20\x4d\x65\x73\x73\x61\x67\x65\x20\x2d\x20\x7e\x52\x65\x61\x64\x2c\x20\x7e\x57\x72\x69\x74\x65\x2c\x20"
......
/* ver.cpp */
// vi: tabstop=4
/* Synchronet version display */
/* $Id: ver.cpp,v 1.31 2019/10/08 02:07:26 rswindell Exp $ */
/* Synchronet version info */
/****************************************************************************
* @format.tab-size 4 (Plain Text/Source Code File Header) *
......@@ -18,21 +13,9 @@
* See the GNU General Public License for more details: gpl.txt or *
* http://www.fsf.org/copyleft/gpl.html *
* *
* Anonymous FTP access to the most recent released source is available at *
* ftp://vert.synchro.net, ftp://cvs.synchro.net and ftp://ftp.synchro.net *
* *
* Anonymous CVS access to the development source and modification history *
* is available at cvs.synchro.net:/cvsroot/sbbs, example: *
* cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs login *
* (just hit return, no password is necessary) *
* cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs checkout src *
* *
* For Synchronet coding style and modification guidelines, see *
* http://www.synchro.net/source.html *
* *
* You are encouraged to submit any modifications (preferably in Unix diff *
* format) via e-mail to mods@synchro.net *
* *
* Note: If this box doesn't appear square, then you need to fix your tabs. *
****************************************************************************/
......@@ -40,8 +23,11 @@
#include "ssl.h"
#include "git_hash.h"
#include "git_branch.h"
#include "ver.h"
const char* beta_version = " "; /* Space if non-beta, " beta" otherwise */
extern "C" const char* git_hash = GIT_HASH;
extern "C" const char* git_branch = GIT_BRANCH;
extern "C" const char* beta_version = " "; /* Space if non-beta, " beta" otherwise */
#if defined(_WINSOCKAPI_)
extern WSADATA WSAData;
......
/* Synchronet version info */
/****************************************************************************
* @format.tab-size 4 (Plain Text/Source Code File Header) *
* @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) *
* *
* Copyright Rob Swindell - http://www.synchro.net/copyright.html *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
* as published by the Free Software Foundation; either version 2 *
* of the License, or (at your option) any later version. *
* See the GNU General Public License for more details: gpl.txt or *
* http://www.fsf.org/copyleft/gpl.html *
* *
* For Synchronet coding style and modification guidelines, see *
* http://www.synchro.net/source.html *
* *
* Note: If this box doesn't appear square, then you need to fix your tabs. *
****************************************************************************/
#ifndef _VER_H_
#define _VER_H_
#ifdef __cplusplus
extern "C" {
#endif
extern const char* git_hash;
extern const char* git_branch;
extern const char* beta_version;
#ifdef __cplusplus
}
#endif
#endif /* Don't add anything after this line */
\ No newline at end of file