From: nveid <nveid@cobramush.org>
Date: Tue, 10 Apr 2007 05:56:14 +0000 (+0000)
Subject: Fixed cbuffer crash, removed console.c from MANIFEST, and udpated numerous places... 
X-Git-Url: https://git.theari.com/?a=commitdiff_plain;h=fb8ecce7a884a300b6dbe93a584e9610d94acd41;p=cobramush.git

Fixed cbuffer crash, removed console.c from MANIFEST, and udpated numerous places where PennMUSH was referenced where cobraMUSH should be referenced.
(cherry picked from commit 672bc5a716bdb1de6437ff85131571ba8ed2e8fa)
---

diff --git a/MANIFEST b/MANIFEST
index 4e66385..b95d461 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -159,7 +159,6 @@ src/comp_w.c
 src/comp_w8.c
 src/compress.c
 src/conf.c
-src/console.c
 src/cque.c
 src/create.c
 src/cron.c
diff --git a/MANIFEST.new b/MANIFEST.new
index 9e5a268..14c229e 100644
--- a/MANIFEST.new
+++ b/MANIFEST.new
@@ -158,7 +158,6 @@ src/comp_w.c
 src/comp_w8.c
 src/compress.c
 src/conf.c
-src/console.c
 src/cque.c
 src/create.c
 src/cron.c
diff --git a/Makefile.SH b/Makefile.SH
index 9766dff..7171441 100644
--- a/Makefile.SH
+++ b/Makefile.SH
@@ -32,7 +32,7 @@ fi
 : Protect any dollar signs and backticks that you do not want interpreted
 : by putting a backslash in front.  You may delete these comments.
 $spitshell >Makefile <<!GROK!THIS!
-# Makefile for PennMUSH 
+# Makefile for CobraMUSH 
 
 # - System configuration - #
 
@@ -229,12 +229,13 @@ clean:
 	(cd game; rm -f netmush console info_slave)
 
 distclean: 
-	(cd src; make distclean)
-	(cd hdrs; rm -f *.orig *~ \#* *.rej *.bak funs.h cmds.h)
-	(cd utils; rm -f *.orig *~ \#* *.rej *.bak)
-	(cd game; rm -rf *.log netmush console info_slave *.orig *.rej *~ *.bak mush.cnf)
+	(cd hdrs; rm -f *.orig *~ \#* *.rej *.bak funs.h cmds.h buildinf.h patches.h)
+	(cd utils; rm -f *.orig *~ \#* *.rej *.bak mkcmds.sh)
+	(cd game; rm -rf *.log netmush info_slave *.orig *.rej *~ *.bak mush.cnf)
 	(cd os2; rm -rf *.rej *.orig *~ *.bak)
+	(cd src; make distclean; rm -f Makefile)
 	(cd game/txt; make clean)
+	(rm -rf .config Makefile config.h config.sh options.h)
 
 totallyclean: distclean 
 	(cd hdrs; rm -rf *.rej)
diff --git a/game/txt/changes/0.73 b/game/txt/changes/0.73
index aaced6b..fb6b6d9 100644
--- a/game/txt/changes/0.73
+++ b/game/txt/changes/0.73
@@ -187,4 +187,5 @@ CobraMUSH Version 0.73
    * Added stringsecs(). [RLB]
    * Added nwho(), xwho(), xmwho(), xwhoid(), xmwhoid(). [RLB]
    * Added mwhoid(), lwhoid(). [RLB]
+   * make distclean is now more throughough. [RLB]
 
diff --git a/src/Makefile.SH b/src/Makefile.SH
index 1f53b0f..5a4a42a 100644
--- a/src/Makefile.SH
+++ b/src/Makefile.SH
@@ -27,7 +27,7 @@ fi
 : Protect any dollar signs and backticks that you do not want interpreted
 : by putting a backslash in front.  You may delete these comments.
 $spitshell >Makefile <<!GROK!THIS!
-# Makefile for PennMUSH
+# Makefile for CobraMUSH
 
 ###############################################################################
 #         You shouldn't have to change anything in this file.                 #
diff --git a/src/extchat.c b/src/extchat.c
index 59bcea7..53d2ffd 100644
--- a/src/extchat.c
+++ b/src/extchat.c
@@ -2369,9 +2369,12 @@ FUNCTION(fun_cinfo)
     }
     if (string_prefix(called_as, "CD"))
       safe_str(ChanTitle(c), buff, bp);
-    else if (string_prefix(called_as, "CB"))
-      safe_integer(BufferQSize(ChanBufferQ(c)), buff, bp);
-    else if (string_prefix(called_as, "CU"))
+    else if (string_prefix(called_as, "CB")) {
+      if(ChanBufferQ(c) != NULL)
+	safe_integer(BufferQSize(ChanBufferQ(c)), buff, bp);
+      else 
+	safe_chr('0', buff, bp);
+    } else if (string_prefix(called_as, "CU"))
       safe_integer(ChanNumUsers(c), buff, bp);
     else if (string_prefix(called_as, "CM"))
       safe_integer(ChanNumMsgs(c), buff, bp);
diff --git a/src/filecopy.c b/src/filecopy.c
index def38ec..aec19ba 100644
--- a/src/filecopy.c
+++ b/src/filecopy.c
@@ -197,13 +197,13 @@ Win32MUSH_setup(void)
 #ifndef _DEBUG
   char FileName[256];
   if (GetModuleFileName(NULL, FileName, 256) != 0) {
-    if (!strcasecmp(rindex(FileName, '\\') + 1, "pennmush.exe")) {
-      if (CopyFile("pennmush.exe", "pennmush_run.exe", FALSE)) {
+    if (!strcasecmp(rindex(FileName, '\\') + 1, "cobramush.exe")) {
+      if (CopyFile("cobramush.exe", "cobramush_run.exe", FALSE)) {
 	do_rawlog(LT_ERR, "Successfully copied executable, starting copy.");
 #ifdef WIN32SERVICES
-	execl("pennmush_run.exe", "pennmush_run.exe", "/run", NULL);
+	execl("cobramush_run.exe", "cobramush_run.exe", "/run", NULL);
 #else
-	execl("pennmush_run.exe", "pennmush_run.exe", confname, NULL);
+	execl("cobramush_run.exe", "cobramush_run.exe", confname, NULL);
 #endif
       }
     }
diff --git a/src/services.c b/src/services.c
index 9da01a3..73a6e56 100644
--- a/src/services.c
+++ b/src/services.c
@@ -23,8 +23,8 @@
 
 #ifdef WIN32SERVICES
 
-#define THIS_SERVICE "PennMUSH"
-#define THIS_SERVICE_DISPLAY "PennMUSH for Win32"
+#define THIS_SERVICE "CobraMUSH"
+#define THIS_SERVICE_DISPLAY "CobraMUSH for Win32"
 
 int WIN32_CDECL main(int argc, char **argv);
 void mainthread(int argc, char **argv);
@@ -130,14 +130,14 @@ main(argc, argv)
 
      */
 
-    fprintf(stderr, T("Attempting to start PennMUSH as a service ...\n"));
+    fprintf(stderr, T("Attempting to start CobraMUSH as a service ...\n"));
     if (!StartServiceCtrlDispatcher(dispatchTable)) {
       fprintf(stderr,
 	      T
 	      ("Unable to start service, assuming running console-mode application.\n"));
       fprintf(stderr,
 	      T
-	      ("You can save time on the next invocation by specifying: pennmush /run\n"));
+	      ("You can save time on the next invocation by specifying: cobramush /run\n"));
       worker_thread(NULL);
     }
   }				/*  end of argc == 1 */
diff --git a/src/wiz.c b/src/wiz.c
index 4fd8d19..766957d 100644
--- a/src/wiz.c
+++ b/src/wiz.c
@@ -1773,7 +1773,7 @@ do_reboot(dbref player, int flag)
 #ifndef WIN32
   execl("netmush", "netmush", confname, NULL);
 #else
-  execl("pennmush.exe", "pennmush.exe", "/run", NULL);
+  execl("cobramush.exe", "cobramush.exe", "/run", NULL);
 #endif				/* WIN32 */
   exit(1);			/* Shouldn't ever get here, but just in case... */
 }
diff --git a/utils/clwrapper.sh b/utils/clwrapper.sh
index 3601caf..dcb4920 100644
--- a/utils/clwrapper.sh
+++ b/utils/clwrapper.sh
@@ -11,7 +11,7 @@ while test $# -gt 0; do
 		shift
 		case "x$1" in
 		x*.o) args="$args /Fo$1";;
-		xnetmud) outfile="/out:PennMUSH.exe";;
+		xnetmud) outfile="/out:CobraMUSH.exe";;
 		x*) outfile="/out:$1.exe";;
 		esac
 		shift