[mw-devel] MW3 r1297 - in trunk: . src src/server src/webclient

welshbyte at sucs.org welshbyte at sucs.org
Mon Nov 19 21:03:41 GMT 2012


Author: welshbyte
Date: 2012-11-19 21:03:41 +0000 (Mon, 19 Nov 2012)
New Revision: 1297

Removed:
   trunk/login.banner.devel
Modified:
   trunk/src/Makefile
   trunk/src/add.c
   trunk/src/bb.h
   trunk/src/edit.c
   trunk/src/init.c
   trunk/src/ipc.c
   trunk/src/js.c
   trunk/src/log.c
   trunk/src/main.c
   trunk/src/newmain.c
   trunk/src/script_inst.c
   trunk/src/server/Makefile
   trunk/src/sqlite.c
   trunk/src/talker.c
   trunk/src/user.c
   trunk/src/webclient/Makefile
Log:
Remove the concept of a "Development version" since it's easy to test mw without special permissions now and the only thing it seems to change is the login banner anyway. Also fix up more unnecessary includes and externs.


Deleted: trunk/login.banner.devel
===================================================================
--- trunk/login.banner.devel	2012-11-19 19:22:51 UTC (rev 1296)
+++ trunk/login.banner.devel	2012-11-19 21:03:41 UTC (rev 1297)
@@ -1,21 +0,0 @@
-
-                  #     #
-###  ###   ##    ##    ##    ##
- ##  ##         ###   ###
- ### ##          ##    ##
- ######     #    ##    ##     #   ###   ##   ####    ####  ##   ####
- ######    ##    ##    ##    ##    ##   #   #   ##    ##   #   ##  #
- # # ##   ###    ##    ##   ###    ## # #      ###     ## ##   ###
- #   ##    ##    ##    ##    ##    ## ###    ## ##     ####     ###
- #   ##    ##    ##    ##    ##    ######   ##  ###     ###      ###
- #   ##    ##    ##    ##    ##    ## ##    ## ###       #     #  ##
-### ####  ####  ####  ####  ####   #  #      ## #       #      ####
-                                                      ###
-  DEVELOPMENT VERSION OF MILLIWAYS TALKER             ##
-
---------------------------------------------------------------------
-
-THIS VERSION MAY BE UNSTABLE AND YOU MAY BE KICKED OFF WITHOUT PRIOR
-WARNING. IT MAY SOMETIMES ALSO NOT BE AVAILABLE FOR USE.
-RECOMMENDED FOR USE BY DEVELOPERS AND TEST USERS ONLY
-

Modified: trunk/src/Makefile
===================================================================
--- trunk/src/Makefile	2012-11-19 19:22:51 UTC (rev 1296)
+++ trunk/src/Makefile	2012-11-19 21:03:41 UTC (rev 1297)
@@ -33,9 +33,6 @@
 ### Optimisation - uncomment for release & extra testing
 CFLAGS+=-O3
 
-### Only ever uncomment for final release versions
-DEFS+= -DRELEASE
-
 CFLAGS += $(DEFS)
 
 build: mw

Modified: trunk/src/add.c
===================================================================
--- trunk/src/add.c	2012-11-19 19:22:51 UTC (rev 1296)
+++ trunk/src/add.c	2012-11-19 21:03:41 UTC (rev 1297)
@@ -20,7 +20,6 @@
 #include "read.h"
 #include "main.h"
 #include "init.h"
-#include "mesg.h"
 #include "intl.h"
 #include "add.h"
 #include "talker.h"

Modified: trunk/src/bb.h
===================================================================
--- trunk/src/bb.h	2012-11-19 19:22:51 UTC (rev 1296)
+++ trunk/src/bb.h	2012-11-19 21:03:41 UTC (rev 1297)
@@ -24,7 +24,6 @@
 
 #define LOGFILE		LOGDIR"/log.bb"
 #define LOGIN_BANNER	"login.banner"
-#define DEVEL_BANNER	"login.banner.devel"
 #define LOCKFILE	"/tmp/bb.locked"
 #define EDITOR		"/usr/bin/vim"
 #define SECUREEDITOR	"/bin/rnano"

Modified: trunk/src/edit.c
===================================================================
--- trunk/src/edit.c	2012-11-19 19:22:51 UTC (rev 1296)
+++ trunk/src/edit.c	2012-11-19 21:03:41 UTC (rev 1297)
@@ -22,7 +22,6 @@
 #include "files.h"
 #include "strings.h"
 #include "perms.h"
-#include "mesg.h"
 #include "getpass.h"
 #include "edit.h"
 #include "init.h"

Modified: trunk/src/init.c
===================================================================
--- trunk/src/init.c	2012-11-19 19:22:51 UTC (rev 1296)
+++ trunk/src/init.c	2012-11-19 21:03:41 UTC (rev 1297)
@@ -74,14 +74,10 @@
 		curl_easy_setopt(cl, CURLOPT_WRITEDATA, file);
 		curl_easy_setopt(cl, CURLOPT_URL, filename);
 		curl_easy_setopt(cl, CURLOPT_ERRORBUFFER, cerr);
-#ifdef RELEASE
 		if (atoi(VER_TWK) > 0)
 			curl_easy_setopt(cl, CURLOPT_USERAGENT, "Milliways III v" VER_MAJ "." VER_MIN "." VER_TWK);
 		else
 			curl_easy_setopt(cl, CURLOPT_USERAGENT, "Milliways III v" VER_MAJ "." VER_MIN);
-#else
-		curl_easy_setopt(cl, CURLOPT_USERAGENT, "Milliways III v" VER_MAJ "." VER_MIN "." VER_TWK " (Dev)");
-#endif
 		if (curl_easy_perform(cl))
 			fprintf(stderr, "Error loading %s: %s\n", filename, cerr);
 		curl_easy_cleanup(cl);

Modified: trunk/src/ipc.c
===================================================================
--- trunk/src/ipc.c	2012-11-19 19:22:51 UTC (rev 1296)
+++ trunk/src/ipc.c	2012-11-19 21:03:41 UTC (rev 1297)
@@ -7,7 +7,6 @@
 
 #include "ipc.h"
 #include "iconv.h"
-#include "mesg.h"
 #include "files.h"
 #include "socket.h"
 #include "strings.h"

Modified: trunk/src/js.c
===================================================================
--- trunk/src/js.c	2012-11-19 19:22:51 UTC (rev 1296)
+++ trunk/src/js.c	2012-11-19 21:03:41 UTC (rev 1297)
@@ -771,14 +771,10 @@
 		curl_easy_setopt(cl, CURLOPT_WRITEDATA, answer);
 		curl_easy_setopt(cl, CURLOPT_URL, url);
 		curl_easy_setopt(cl, CURLOPT_ERRORBUFFER, cerr);
-#ifdef RELEASE
 		if (atoi(VER_TWK) > 0)
-				curl_easy_setopt(cl, CURLOPT_USERAGENT, "Milliways III v" VER_MAJ "." VER_MIN "." VER_TWK);
+			curl_easy_setopt(cl, CURLOPT_USERAGENT, "Milliways III v" VER_MAJ "." VER_MIN "." VER_TWK);
 		else
-				curl_easy_setopt(cl, CURLOPT_USERAGENT, "Milliways III v" VER_MAJ "." VER_MIN);
-#else
-		curl_easy_setopt(cl, CURLOPT_USERAGENT, "Milliways III v" VER_MAJ "." VER_MIN "." VER_TWK " (Dev)");
-#endif
+			curl_easy_setopt(cl, CURLOPT_USERAGENT, "Milliways III v" VER_MAJ "." VER_MIN);
 		if (curl_easy_perform(cl)) {
 			snprintf(msg, MAXTEXTLENGTH-1, "JavaScript urlget failed %s: %s", url, cerr);
 			js_warning(cx, msg);

Modified: trunk/src/log.c
===================================================================
--- trunk/src/log.c	2012-11-19 19:22:51 UTC (rev 1296)
+++ trunk/src/log.c	2012-11-19 21:03:41 UTC (rev 1297)
@@ -7,7 +7,6 @@
 #include <sqlite3.h>
 #include <gnutls/openssl.h>
 #include <curl/curl.h>
-#include <stdint.h>
 
 #include "strings.h"
 #include "js.h"

Modified: trunk/src/main.c
===================================================================
--- trunk/src/main.c	2012-11-19 19:22:51 UTC (rev 1296)
+++ trunk/src/main.c	2012-11-19 21:03:41 UTC (rev 1297)
@@ -60,15 +60,8 @@
 extern Alias shutdown_list;
 extern Alias eventin_list;
 
+static char version[]="Milliways III - Release "VER_MAJ"."VER_MIN"."VER_TWK"\n";
 
-#ifdef RELEASE
-	static char version[]="Milliways III - Release "VER_MAJ"."VER_MIN"."VER_TWK"\n";
-	char version_str[]="R "VER_MAJ" "VER_MIN;
-#else
-	static char version[]="Milliways III - Devel "VER_MAJ"."VER_MIN"."VER_TWK" built "BUILD_DATE" by "BUILD_USER"\n";
-	char version_str[]="D "VER_MAJ" "VER_MIN" "VER_TWK" "BUILD_USER" "BUILD_DATE;
-#endif
-
 /* global termcap usage variable */
 int g_boTermCap = 0;
 
@@ -76,7 +69,6 @@
 int internet=0;
 int autochat=0;
 int autowho=0;
-int runautoexec=1;
 const char *autoexec_arg;
 char *targethost = NULL;
 
@@ -639,13 +631,8 @@
 	save_terminal();
 
 	/* show login banner, and version info */
-#ifdef RELEASE
 	/* allow disabling of banner in release version */
 	if (!autochat) printfile(makepath(LOGIN_BANNER,"",""));
-#else   
-	/* ALWAYS show banner in devel version, even if autochat */
-	printfile(makepath(DEVEL_BANNER,"",""));
-#endif  
 	printf("%s\n",version);
 
 	/* log the user in by asking for their name (and details) */
@@ -2010,15 +1997,11 @@
 
 void c_version(CommandList *cm, int argc, const char **argv, char *args)
 {
-#ifdef RELEASE
 	if (atoi(VER_TWK) > 0)
-	printf(_("Release version %s.%s.%s\n"), VER_MAJ, VER_MIN, VER_TWK);
+	printf(_("Version %s.%s.%s\n"), VER_MAJ, VER_MIN, VER_TWK);
 	else
-	printf(_("Release version %s.%s\n"), VER_MAJ, VER_MIN);
-#else
-	printf(_("Development version %s.%s.%s\n"), VER_MAJ, VER_MIN, VER_TWK);
-#endif
-	printf(_("Built by %s on %s\n"), BUILD_USER, BUILD_DATE);
+	printf(_("Version %s.%s\n"), VER_MAJ, VER_MIN);
+	printf(_("Built by %s on %s\n"), BUILD_USER, __DATE__);
 }
 
 void devel_msg(const char *func, const char *fmt, ...)

Modified: trunk/src/newmain.c
===================================================================
--- trunk/src/newmain.c	2012-11-19 19:22:51 UTC (rev 1296)
+++ trunk/src/newmain.c	2012-11-19 21:03:41 UTC (rev 1297)
@@ -21,7 +21,6 @@
 #include "colour.h"
 #include "who.h"
 #include "mod.h"
-#include "mesg.h"
 #include "getpass.h"
 #include "add.h"
 #include "init.h"

Modified: trunk/src/script_inst.c
===================================================================
--- trunk/src/script_inst.c	2012-11-19 19:22:51 UTC (rev 1296)
+++ trunk/src/script_inst.c	2012-11-19 21:03:41 UTC (rev 1297)
@@ -2268,7 +2268,7 @@
 void scr_version( struct code *pc, int fargc, char **fargv )
 {
 	char *what, *value;
-	extern char version_str[];
+	const char *version_str = "R "VER_MAJ" "VER_MIN;
 
 	if (pc->argc < 1) {
 		if (script_debug) printf("Error in %s at %s too few arguments.\n", pc->inst->name, pc->debug);

Modified: trunk/src/server/Makefile
===================================================================
--- trunk/src/server/Makefile	2012-11-19 19:22:51 UTC (rev 1296)
+++ trunk/src/server/Makefile	2012-11-19 21:03:41 UTC (rev 1297)
@@ -29,9 +29,6 @@
 ### Optimisation - uncomment for release & extra testing
 #CFLAGS+=-O3
 
-### Only ever uncomment for final release versions
-DEFS+= -DRELEASE
-
 CFLAGS += $(DEFS)
 
 build: mwserv

Modified: trunk/src/sqlite.c
===================================================================
--- trunk/src/sqlite.c	2012-11-19 19:22:51 UTC (rev 1296)
+++ trunk/src/sqlite.c	2012-11-19 21:03:41 UTC (rev 1297)
@@ -4,7 +4,6 @@
 #include <stdlib.h>
 #include "sqlite.h"
 #include <sqlite3.h>
-#include "bb.h"
 
 #define USERSQL STATEDIR"/users.db"
 

Modified: trunk/src/talker.c
===================================================================
--- trunk/src/talker.c	2012-11-19 19:22:51 UTC (rev 1296)
+++ trunk/src/talker.c	2012-11-19 21:03:41 UTC (rev 1297)
@@ -46,7 +46,7 @@
 extern int32_t userposn;
 extern unsigned long loggedin; 
 extern int quietmode;
-extern int runautoexec;
+static int runautoexec = 1;
 
 extern struct room myroom;
 

Modified: trunk/src/user.c
===================================================================
--- trunk/src/user.c	2012-11-19 19:22:51 UTC (rev 1296)
+++ trunk/src/user.c	2012-11-19 21:03:41 UTC (rev 1297)
@@ -19,7 +19,6 @@
 #include "strings.h"
 #include "getpass.h"
 #include "perms.h"
-#include "mesg.h"
 #include "read.h"
 #include "who.h"
 #include "echo.h"
@@ -95,15 +94,6 @@
 		SAFE_FREE(fold);
 		exit(0);
 	}
-#if (!defined(RELEASE) && !defined(PUBLIC))
-	if (getuid()!=geteuid() && !s_devel(usr->special) && !u_god(usr->status))
-	{
-		printf(_("Sorry, you do not have permission to run development versions of milliways.\n"));
-		SAFE_FREE(user);
-		SAFE_FREE(fold);
-		exit(0);
-	}
-#endif
 	printf(_("Hello %s.\n"),usr->name);
 	return(true);
 }
@@ -293,15 +283,7 @@
 	if(*c=='y' || *c=='Y')
 	{
 		int diff=false;
-#ifndef RELEASE
-		if (getuid()!=geteuid())
-		{
-			printf(_("Sorry, you do not have permission to run development versions of milliways.\nPlease log in again using the public version.\n"));
-			SAFE_FREE(user);
-			SAFE_FREE(fold);
-			exit(0);
-		}
-#endif
+
 		pick_salt(salt);
 		printf(_("We use a password on this BB.\n"));
 		fflush(stdout);

Modified: trunk/src/webclient/Makefile
===================================================================
--- trunk/src/webclient/Makefile	2012-11-19 19:22:51 UTC (rev 1296)
+++ trunk/src/webclient/Makefile	2012-11-19 21:03:41 UTC (rev 1297)
@@ -29,9 +29,6 @@
 ### Optimisation - uncomment for release & extra testing
 #CFLAGS+=-O3
 
-### Only ever uncomment for final release versions
-DEFS+= -DRELEASE
-
 CFLAGS += $(DEFS)
 
 build: mwpoll




More information about the mw-devel mailing list