Common subdirectories: gameserv-1.0.1-src.dist/CVS and gameserv-1.0.1-src.hyb/CVS
diff -u gameserv-1.0.1-src.dist/Makefile gameserv-1.0.1-src.hyb/Makefile
--- gameserv-1.0.1-src.dist/Makefile	Wed Oct 22 16:55:05 2003
+++ gameserv-1.0.1-src.hyb/Makefile	Sat Oct 25 14:09:32 2003
@@ -12,7 +12,7 @@
 # Comment the following line if you are not using the gnu c compiler
 # C_ARGS = -Wall
 #C_ARGS = -Wno-non-template-friend -O9
-C_ARGS =-Wno-deprecated -O9
+C_ARGS =-Wno-deprecated -O2
 
 # You might have to change this if your c compiler is not cc
 CC = g++
diff -u gameserv-1.0.1-src.dist/config.cpp gameserv-1.0.1-src.hyb/config.cpp
--- gameserv-1.0.1-src.dist/config.cpp	Sat Oct 18 02:20:08 2003
+++ gameserv-1.0.1-src.hyb/config.cpp	Sat Oct 25 14:09:32 2003
@@ -16,6 +16,7 @@
 char *servername;		// GameServ's Server
 char *c_Forest;			// Forest channel
 char *c_ForestTopic; 		// Forest Channel Topic
+char *adminpass;		// Administrator password
 
 
 // Remote server stuff. This is used for the outgoing connection gameserv needs to make
@@ -48,6 +49,8 @@
 	delete [] remotepass;
     if (playerdata)
 	delete [] playerdata;
+    if (adminpass)
+	delete [] adminpass;
 }
 void load_config_file(char *config)
 {
@@ -132,6 +135,12 @@
 	    value = strtok(NULL, "");
 	    playerdata = new char[strlen(value) + 1];
 	    strcpy(playerdata, value);
+	}
+	else if (stricmp(directive, "ADMINPASS") == 0)
+	{
+	    value = strtok(NULL, "");
+	    adminpass = new char[strlen(value) + 1];
+	    strcpy(adminpass, value);
 	}
 	else
 	{
diff -u gameserv-1.0.1-src.dist/extern.h gameserv-1.0.1-src.hyb/extern.h
--- gameserv-1.0.1-src.dist/extern.h	Thu Oct 23 17:27:19 2003
+++ gameserv-1.0.1-src.hyb/extern.h	Sat Oct 25 14:09:32 2003
@@ -27,6 +27,7 @@
 E char *remoteport;
 E char *remotepass;
 E char *playerdata;
+E char *adminpass;
 
 E List<aClient> clients;
 E List<aClient> players;
diff -u gameserv-1.0.1-src.dist/gameserv.cpp gameserv-1.0.1-src.hyb/gameserv.cpp
--- gameserv-1.0.1-src.dist/gameserv.cpp	Fri Oct 24 13:33:06 2003
+++ gameserv-1.0.1-src.hyb/gameserv.cpp	Sat Oct 25 14:10:52 2003
@@ -4,10 +4,10 @@
 #include "extern.h"
 #include <cctype>
 #include <fstream.h>
-#include <crypt.h>
+//#include <crypt.h>
 
 // Uncomment this and comment out crypt.h if you're on BSD or SunOS
-//#include <unistd.h>
+#include <unistd.h>
 
 List<aClient> players;
 Monster *monsters[LEVELS][MONSTERS];  	// Monsters per level. Total = MONSTERS * LEVELS
@@ -118,7 +118,7 @@
 	timestamp = strtok(NULL, "\1");
         notice(s_GameServ, source, "\1PING %s\1", timestamp);
     } else if (stricmp(cmd, ":\1VERSION\1") == 0) {
-	notice(s_GameServ, source, "\1VERSION GameServ v1.0b\1");
+	notice(s_GameServ, source, "\1VERSION GameServ v1.0b+hybrid_0.1\1");
     } else if (stricmp(cmd, "SEARCH") == 0) {
 	cmd = strtok(NULL, " ");
 
@@ -155,15 +155,47 @@
     } else if (stricmp(cmd, "STATS") == 0) {
 	do_stats(source);
     } else if (stricmp(cmd, "SHUTDOWN") == 0) {
-	save_gs_dbase();
-	raw("SQUIT %s :leaving", servername);
+	char *pass = strtok(NULL, " ");
+	if (pass != NULL && (stricmp(pass, adminpass) == 0))
+	{
+	    save_gs_dbase();
+	    raw("SQUIT %s :leaving", servername);
+	}
+	else
+	{
+	    notice(s_GameServ, source, "SYNTAX: /msg %S SHUTDOWN <password>");
+	}
     } else if (stricmp(cmd, "SAVE") == 0) {
-	save_gs_dbase();
+        char *pass = strtok(NULL, " ");
+        if (pass != NULL && (stricmp(pass, adminpass) == 0))
+        {
+	    save_gs_dbase();
+        }
+        else
+        {
+            notice(s_GameServ, source, "SYNTAX: /msg %S SAVE <password>");
+        }
     } else if (stricmp(cmd, "LOAD") == 0) {
-	load_gs_dbase();
+        char *pass = strtok(NULL, " ");
+        if (pass != NULL && (stricmp(pass, adminpass) == 0))
+        {
+	    load_gs_dbase();
+	}
+        else
+        {
+            notice(s_GameServ, source, "SYNTAX: /msg %S LOAD <password>");
+        }
     } else if (stricmp(cmd, "RAW") == 0) {
-	char *rest = strtok(NULL, "");
-	raw(rest);
+        char *pass = strtok(NULL, " ");
+        if (pass != NULL && (stricmp(pass, adminpass) == 0))
+        {
+	    char *rest = strtok(NULL, "");
+	    raw("%s", rest);
+	}
+        else
+        {
+            notice(s_GameServ, source, "SYNTAX: /msg %S RAW <password> <raw>");
+        }
     }
 
    source--;  // Bring the : back so we don't leak memory
diff -u gameserv-1.0.1-src.dist/gameserv.example.conf gameserv-1.0.1-src.hyb/gameserv.example.conf
--- gameserv-1.0.1-src.dist/gameserv.example.conf	Fri Oct 24 12:09:28 2003
+++ gameserv-1.0.1-src.hyb/gameserv.example.conf	Sat Oct 25 14:09:32 2003
@@ -28,3 +28,6 @@
 
 # Filename to store player data in.
 playerdata players.dat
+
+# Password to control SHUTDOWN, LOAD, and SAVE
+adminpass apass
diff -u gameserv-1.0.1-src.dist/tcpclient.cpp gameserv-1.0.1-src.hyb/tcpclient.cpp
--- gameserv-1.0.1-src.dist/tcpclient.cpp	Thu Oct 23 17:27:19 2003
+++ gameserv-1.0.1-src.hyb/tcpclient.cpp	Sat Oct 25 18:57:36 2003
@@ -56,14 +56,11 @@
     return -1;
   }
 
-	raw("PROTOCTL NICKv2 VHP");
-	raw("PASS :%s", remotepass);
+	raw("PASS %s :TS", remotepass);
 	raw("SERVER %s 1 :Testing Server", servername);
-	raw("NICK %S 1 %d %S %s %s %d +owghraAxNt %s :GameServ", time(NULL), gshost, 
-		servername, time(NULL), gshost);
-	raw(":%S JOIN %s", c_Forest);
-	raw(":%S MODE %s +o %S", c_Forest);
-	raw(":%S MODE %s +ntm", c_Forest);
+	raw("NICK %S %ld 1 +o %S %s %s :GameServ", time(NULL), gshost, 
+		servername);
+	raw(":%s SJOIN 1 %s +ntm :@%S", servername, c_Forest);
 
   sock_gets(sock,buffer,sizeof(buffer)-1); /* -1 added thanks to
     David Duchene <dave@ltd.com> for pointing out the possible
@@ -128,11 +125,28 @@
 		gameserv(source, rest);
 	    else if (stricmp(dest, c_Forest) == 0)
 		forest(source, rest);
-	} else if (stricmp(cmd, "JOIN") == 0) {
+	} else if (stricmp(cmd, "SJOIN") == 0) {
 	    char *channel;
-	    channel = strtok(NULL, " ");
-	    if (stricmp(channel, c_Forest) == 0 && is_playing(source + 1))
-		raw(":%S MODE %s +v %s", c_Forest, (source + 1));
+	    char *userptr;
+	    char *tmp;
+	    channel = strtok(NULL, " "); // channel timestamp
+	    channel = strtok(NULL, " "); // channel name
+	    tmp = strrchr(buffer, ':');
+	    tmp++;
+	    userptr = strtok(tmp, " ");
+	    while (userptr != NULL)
+	    {
+		if (*userptr == '@')
+		    userptr++;
+		if (*userptr == '+')
+		   userptr++; // Assume that for users opped and voiced
+			      // that they are never passed as +@user
+
+		if (stricmp(channel, c_Forest) == 0 && is_playing(userptr))
+		    raw(":%S MODE %s +v %s", c_Forest, userptr);
+
+		userptr = strtok(NULL, " ");
+	    }
 	} else {
 	   // cout << "Unrecognized Message: cmd = " << cmd << setw(30) << "source = " << 
 	   //	    source << endl;
