--- /dev/null
+VERSION LOG
+
+2011-10-05 5.1
+ first production version...
+
+2011-08-09 5.0 (dev)
+ developing period...
static int general_ctcp(char *buffer, char *command, char *text) {
if(!stricmp(command, "VERSION")) {
- sprintf(buffer, "VERSION NeonServ v" NEONSERV_VERSION " by pk910 (%s)", (strcmp(revision, "") ? revision : "-"));
+ sprintf(buffer, "VERSION NeonServ v%s.%d by pk910 (%s)", NEONSERV_VERSION, patchlevel, (strcmp(revision, "") ? revision : "-"));
return 1;
}
if(!stricmp(command, "FINGER")) {
- sprintf(buffer, "FINGER NeonServ v" NEONSERV_VERSION " (%s) build %s lines C code using " COMPILER " (see +netinfo)", (strcmp(revision, "") ? revision : "-"), codelines);
+ sprintf(buffer, "FINGER NeonServ v%s.%d (%s) build %s lines C code using " COMPILER " (see +netinfo)", NEONSERV_VERSION, patchlevel, (strcmp(revision, "") ? revision : "-"), codelines);
return 1;
}
if(!stricmp(command, "PING")) {
table_add(table, content);
if(strcmp(revision, ""))
- sprintf(tmp, "%s (%s)", NEONSERV_VERSION, revision);
+ sprintf(tmp, "%s.%d (%s)", NEONSERV_VERSION, patchlevel, revision);
else
- strcpy(tmp, NEONSERV_VERSION);
+ sprintf(tmp, "%s.%d", NEONSERV_VERSION, patchlevel);
content[0] = get_language_string(user, "NS_NETINFO_VERSION");
content[1] = tmp;
table_add(table, content);
*/
CMD_BIND(neonserv_cmd_version) {
- reply(getTextBot(), user, "\002NeonServ " NEONSERV_VERSION "\002 (%s), written by pk910", (strcmp(revision, "") ? revision : "-"));
+ reply(getTextBot(), user, "\002NeonServ %s.%d\002 (%s), written by pk910", NEONSERV_VERSION, patchlevel, (strcmp(revision, "") ? revision : "-"));
reply(getTextBot(), user, "Build (#%s) %s (%s lines, " COMPILER ")", compilation, creation, codelines);
reply(getTextBot(), user, "NeonServ source can be found on: http://git.pk910.de/?p=NeonServV5.git");
//helpers :D
#ifndef _main_h
#define _main_h
-#define NEONSERV_VERSION "5.1.0"
+#define NEONSERV_VERSION "5.1"
+#define VERSION_PATCHLEVEL 352
#ifndef BOTWAR_ALERT_CHAN
#define BOTWAR_ALERT_CHAN NULL
extern const char *creation;
extern const char *revision;
extern const char *codelines;
+extern const int patchlevel;
#endif
\ No newline at end of file
codelines=`find . -type f -regex '\./.*\.h' -or -regex '\./.*\.c' |xargs cat|wc -l`
svn_revision=`svn info | grep Revision | grep -o -E '[0-9]+'`
+git_commitcount=0
if test "x$svn_revision" = "x" ; then
svn_revision=`git log -n 1 --pretty="format:%h"`
if test "x$svn_revision" = "x" ; then
svn_revision="0"
else
- git_commitcount=`git rev-list --all --no-merges | wc -l | sed "s/[ \t]//g"`
+ git_commitcount=`git log --pretty=oneline --no-merges --first-parent | wc -l | sed "s/[ \t]//g"`
svn_revision="git-$git_commitcount-$svn_revision"
fi
else
const char *revision = "$svn_revision";
const char *codelines = "$codelines";
+const int patchlevel = ($git_commitcount ? ($git_commitcount - VERSION_PATCHLEVEL) : 0);
+
!SUB!THIS!