diff -ruN -x configure -x *~ -x ircd-hybrid-6.0.orig -x *.rej ircd-hybrid-6.0.orig/include/config.h ircd-hybrid-6.0/include/config.h
--- ircd-hybrid-6.0.orig/include/config.h	Mon Jun 25 19:57:06 2001
+++ ircd-hybrid-6.0/include/config.h	Mon Jun 25 18:59:16 2001
@@ -896,7 +896,7 @@
  * Port where ircd resides. NOTE: This *MUST* be greater than 1024 if you
  * plan to run ircd under any other uid than root.
  */
-#define PORTNUM 8007
+#define PORTNUM 9000
 
 /* MAXCONNECTIONS - don't touch - change the HARD_FDLIMIT_ instead
  * Maximum number of network connections your server will allow.  This should
diff -ruN -x configure -x *~ -x ircd-hybrid-6.0.orig -x *.rej ircd-hybrid-6.0.orig/include/patchlevel.h ircd-hybrid-6.0/include/patchlevel.h
--- ircd-hybrid-6.0.orig/include/patchlevel.h	Mon Jun 25 19:57:06 2001
+++ ircd-hybrid-6.0/include/patchlevel.h	Mon Jun 25 19:56:51 2001
@@ -17,5 +17,5 @@
  */
 
 #ifndef PATCHLEVEL
-#define PATCHLEVEL    "dancer-ircd-0.9.1.5"
+#define PATCHLEVEL    "dancer-ircd-0.9.1.6"
 #endif
diff -ruN -x configure -x *~ -x ircd-hybrid-6.0.orig -x *.rej ircd-hybrid-6.0.orig/include/send.h ircd-hybrid-6.0/include/send.h
--- ircd-hybrid-6.0.orig/include/send.h	Mon Jun 25 19:57:05 2001
+++ ircd-hybrid-6.0/include/send.h	Mon Jun 25 12:07:29 2001
@@ -74,5 +74,6 @@
 extern  void sendto_ops_flag_butone(struct Client *, int, const char *, ...);
 extern  void sendto_ops_flag_butone_from(struct Client *, int, struct Client*, const char *, ...);
 extern  void sendto_ops_flag_butone_hidefrom(struct Client *, int, const char *, ...);
+extern  void sendto_local_users(const char*, ...);
 
 #endif /* INCLUDED_send_h */
diff -ruN -x configure -x *~ -x ircd-hybrid-6.0.orig -x *.rej ircd-hybrid-6.0.orig/include/umodes.h ircd-hybrid-6.0/include/umodes.h
--- ircd-hybrid-6.0.orig/include/umodes.h	Mon Jun 25 19:57:05 2001
+++ ircd-hybrid-6.0/include/umodes.h	Mon Jun 25 19:29:11 2001
@@ -86,7 +86,7 @@
   {UMODE_SEESTATST, '4'},
   {UMODE_SEESTATSSERV,'5'},
   {UMODE_TESTLINE, '9'},
-  {UMODE_GRANT, '*'},
+  /*  {UMODE_GRANT, '*'},*/
   {0, 0}
 };
 
diff -ruN -x configure -x *~ -x ircd-hybrid-6.0.orig -x *.rej ircd-hybrid-6.0.orig/src/m_map.c ircd-hybrid-6.0/src/m_map.c
--- ircd-hybrid-6.0.orig/src/m_map.c	Mon Jun 25 19:57:06 2001
+++ ircd-hybrid-6.0/src/m_map.c	Mon Jun 25 19:51:40 2001
@@ -55,7 +55,7 @@
     {
       if (aconf->map_done)
 	{
-	  sendto_ops_flag(UMODE_DEBUG, "WTF: already done %s (%d, %s, %d) in m_map()", current->name, aconf ? aconf->map_done : -1, aconf ? aconf->name : "", aconf);
+	  sendto_ops_flag(UMODE_DEBUG, "WTF: already done %s (%d, %s) in m_map()", current->name, aconf ? aconf->map_done : -1, aconf ? aconf->name : "");
 	}
       aconf->map_done = 1;
     }
@@ -118,26 +118,13 @@
 
   if (CanSeeRouting(sptr))
     {
+      struct ConfItem* conf;
       header_length = 0;
       header[0] = '\0';
+      for (conf = ConfigItemList; conf; conf = conf->next)
+	if (conf->status == CONF_NOCONNECT_SERVER)
+	  conf->map_done = 0;
       map_send_server(sptr, parv[0], &me);
-      {
-	struct ConfItem* conf;
-	for (conf = ConfigItemList; conf; conf = conf->next)
-	  {
-	    if (conf->status != CONF_NOCONNECT_SERVER)
-	      continue;
-	    if (strcmp(conf->name, me.name) == 0)
-	      continue;
-	    if (conf->map_done)
-	      {
-		sendto_ops_flag(UMODE_DEBUG, "clearing conf->map_done in m_map(), conf == %d, conf->name == %s, conf->map_done == %d", conf, (conf && conf->name) ? conf->name : "", conf ? conf->map_done : -1);
-		conf->map_done = 0; /* clear it for the next map */
-		continue;
-	      }
-	    sendto_one(sptr, form_str(RPL_MAP), me.name, parv[0], "** ", conf->name);
-	  }
-      }
       sendto_one(sptr,form_str(RPL_ENDOFMAP),me.name,parv[0]);
     }
   else
diff -ruN -x configure -x *~ -x ircd-hybrid-6.0.orig -x *.rej ircd-hybrid-6.0.orig/src/parse.c ircd-hybrid-6.0/src/parse.c
--- ircd-hybrid-6.0.orig/src/parse.c	Mon Jun 25 19:57:05 2001
+++ ircd-hybrid-6.0/src/parse.c	Mon Jun 25 19:55:35 2001
@@ -149,6 +149,8 @@
               ServerStats->is_wrdi++;
               Debug((DEBUG_ERROR, "Message (%s) coming from (%s)",
                      buffer, cptr->name));
+	      sendto_ops_flag(UMODE_DEBUG, "Message (%s) coming from (%s)",
+			      buffer, cptr->name);
 
               return cancel_clients(cptr, from, buffer);
             }
diff -ruN -x configure -x *~ -x ircd-hybrid-6.0.orig -x *.rej ircd-hybrid-6.0.orig/src/s_user.c ircd-hybrid-6.0/src/s_user.c
--- ircd-hybrid-6.0.orig/src/s_user.c	Mon Jun 25 19:57:06 2001
+++ ircd-hybrid-6.0/src/s_user.c	Mon Jun 25 12:07:43 2001
@@ -748,7 +748,7 @@
       Count.max_tot = Count.total;
       if ( (!(Count.max_tot % 2)) && (record_time < CurrentTime - 30) )
         {
-          sendto_ops_flag(UMODE_SERVNOTICE, "New network record: %d users (%d local)", Count.max_tot, Count.max_loc);
+          sendto_local_users("New network record: %d users (%d local)", Count.max_tot, Count.max_loc);
           record_time = CurrentTime;
       }
     }
@@ -2035,47 +2035,12 @@
 			    int mode = user_modes_from_c_to_bitmask[(unsigned char)*m];
 			    if (CanGrantModes(sptr))
 			      {
-				sendto_ops_flag(UMODE_DEBUG, "In grant mode for %s, mode %d, allowed %d", sptr->name, mode, TestBit(sptr->allowed_umodes, mode));
-				if ((what == MODE_ADD) && (mode != UMODE_GRANT) /* You may not grant the ability to grant */
-				    && TestBit(sptr->allowed_umodes, mode))
-				  {
-				    *(m2++) = *m; /* remove the umodes the originators's O:line doesn't allow them to have */
-				    /* But add them to the target's allowed umodes */
-				    SetBit(acptr->allowed_umodes, mode);
-				    sendto_ops_flag(UMODE_SERVNOTICE, "%s has bestowed the power of +%c onto %s",
-						    sptr->name, acptr->name, *m);
-				    log(L_NOTICE, "%s has bestowed the power of +%c onto %s",
-					sptr->name, acptr->name, *m);
-				  }
-				else if ((what == MODE_DEL) && !IsAnOper(acptr))
-				  {
-				    /* If they are not an operator, remove that umode from their allowed_umodes 
-				     *  if it is not in user_umodes
-				     */
-				    if (!TestBit(user_umodes, mode))
-				      {
-					ClearBit(acptr->allowed_umodes, mode);
-					sendto_ops_flag(UMODE_SERVNOTICE, "%s has stripped %s of the power of +%c",
-							sptr->name, acptr->name, *m);
-					log(L_NOTICE, "%s has stripped %s of the power of +%c",
-					    sptr->name, acptr->name, *m);
-				      }
-				  }
+				/* OK, we have to check these against allowed_umodes here */
+				/* NYI */
 			      }
 			    else
-			      {
-				if ((what == MODE_ADD) &&
-				    TestBit(acptr->allowed_umodes, mode))
-				  *(m2++) = *m; /* remove the umodes the target's O:line doesn't allow them to have */
-				else if ((what == MODE_DEL) && !IsAnOper(acptr))
-				  {
-				    /* If they are not an operator, remove that umode from their allowed_umodes 
-				     *  if it is not in user_umodes
-				     */
-				    if (!TestBit(user_umodes, mode))
-				      ClearBit(acptr->allowed_umodes, mode);
-				  }
-			      }
+			      /* We're not doing any magic. Send it on. */
+			      *m2++ = *m;
 			  }
 			  break;
 			}
@@ -2240,6 +2205,25 @@
 	      {
 		if (flag == UMODE_OPER)
 		  break;
+		/* OK, let's handle granting stuff */
+		/* Grant a mode if we're supposed to, if it's not +* itself, and if we are either
+		 *  handling a remote grant or it's allowed locally
+		 */
+		if (CanGrantModes(sptr) && (flag != UMODE_GRANT) && ((sptr->from != cptr->from) || TestBit(sptr->allowed_umodes, flag)))
+		  {
+		    /* We're granting, rather than just normally changing */
+		    /* NYI */
+		    /*
+		      sendto_ops_flag(UMODE_SERVNOTICE, "%s has bestowed the power of +%c onto %s",
+		      sptr->name, acptr->name, *m);
+		      log(L_NOTICE, "%s has bestowed the power of +%c onto %s",
+		      sptr->name, acptr->name, *m);
+		      sendto_ops_flag(UMODE_SERVNOTICE, "%s has stripped %s of the power of +%c",
+		      sptr->name, acptr->name, *m);
+		      log(L_NOTICE, "%s has stripped %s of the power of +%c",
+		      sptr->name, acptr->name, *m);
+		    */
+		  }
 		if (what == MODE_ADD)
 		  SetBit(acptr->umodes, flag);
 		else
diff -ruN -x configure -x *~ -x ircd-hybrid-6.0.orig -x *.rej ircd-hybrid-6.0.orig/src/send.c ircd-hybrid-6.0/src/send.c
--- ircd-hybrid-6.0.orig/src/send.c	Mon Jun 25 19:57:05 2001
+++ ircd-hybrid-6.0/src/send.c	Mon Jun 25 12:10:12 2001
@@ -1421,3 +1421,21 @@
 
   va_end(args);
 }
+
+void
+sendto_local_users(const char* pattern, ...)
+{
+  register aClient *cptr;
+  char nbuf[1024];
+  va_list args;
+  va_start(args, pattern);
+  for (cptr = local_cptr_list; cptr; cptr = cptr->next_local_client)
+    {
+      if (IsPerson(cptr))
+	(void)ircsprintf(nbuf, ":%s NOTICE %s :*** Notice -- ",
+			 me.name, cptr->name);
+      (void)strncat(nbuf, pattern, sizeof(nbuf) - strlen(nbuf));
+      vsendto_one(cptr, nbuf, args);
+    }
+  va_end(args);
+}
