diff -ruN -x configure -x *~ -x ircd-hybrid-6.0.orig -x *.rej ircd-hybrid-6.0.orig/include/listener.h ircd-hybrid-6.0/include/listener.h
--- ircd-hybrid-6.0.orig/include/listener.h	Thu Jul 29 00:06:47 1999
+++ ircd-hybrid-6.0/include/listener.h	Sun Feb 18 12:13:51 2001
@@ -45,12 +45,15 @@
   time_t           last_accept;        /* last time listener accepted */
   struct in_addr   addr;               /* virtual address or INADDR_ANY */
   char             vhost[HOSTLEN + 1]; /* virtual name of listener */
+  int              server_port;        /* servers can connect here */
+  int              user_port;          /* users can connect here */
+  int              hidden_port;        /* don't show in /stats P */
 };
 
 extern struct Listener* ListenerPollList; /* GLOBAL - listener list */
 
 extern void        accept_connection(struct Listener* listener);
-extern void        add_listener(int port, const char* vaddr_ip);
+extern void        add_listener(int port, const char* vaddr_ip, int is_server, int is_user, int is_hidden);
 extern void        close_listener(struct Listener* listener);
 extern void        close_listeners(void);
 extern const char* get_listener_name(const struct Listener* listener);
diff -ruN -x configure -x *~ -x ircd-hybrid-6.0.orig -x *.rej ircd-hybrid-6.0.orig/src/listener.c ircd-hybrid-6.0/src/listener.c
--- ircd-hybrid-6.0.orig/src/listener.c	Sat Oct  9 20:43:01 1999
+++ ircd-hybrid-6.0/src/listener.c	Sun Feb 18 12:24:23 2001
@@ -98,14 +98,36 @@
 
   for (listener = ListenerPollList; listener; listener = listener->next)
     {
-      sendto_one(sptr, form_str(RPL_STATSPLINE),
+/*      sendto_one(sptr, form_str(RPL_STATSPLINE),
                  me.name,
                  sptr->name,
                  'P',
                  listener->port,
                  listener->name,
                  listener->ref_count,
-                 (listener->active)?"active":"disabled");
+                 (listener->active)?"active":"disabled"); */
+       char flags[4];
+       int i = 0;
+       
+       if (listener->server_port)
+	 flags[i++] = 'S';
+       if (listener->user_port)
+	 flags[i++] = 'U';
+       if (listener->hidden_port)
+	 flags[i++] = 'H';
+       flags[i] = '\0';
+       
+       /* Don't send hidden ports */
+       if (!listener->hidden_port || IsAnOper(sptr))
+	 sendto_one(sptr, form_str(RPL_STATSPLINE),
+		    me.name,
+		    sptr->name,
+		    'P',
+		    listener->port,
+		    listener->name,
+		    listener->ref_count,
+		    flags,
+		    (listener->active)?"active":"disabled");
     }
 }
   
@@ -218,7 +240,7 @@
  * vhost_ip - if non-null must contain a valid IP address string in
  * the format "255.255.255.255"
  */
-void add_listener(int port, const char* vhost_ip) 
+void add_listener(int port, const char* vhost_ip, int is_server, int is_user, int is_hidden)
 {
   struct Listener* listener;
   struct in_addr   vaddr;
@@ -231,7 +253,7 @@
 
   vaddr.s_addr = INADDR_ANY;
 
-  if (vhost_ip) {
+  if (vhost_ip[0]) {
     vaddr.s_addr = inet_addr(vhost_ip);
     if (INADDR_NONE == vaddr.s_addr)
       return;
@@ -239,6 +261,9 @@
 
   if ((listener = find_listener(port, vaddr))) {
     listener->active = 1;
+    listener->server_port = is_server;
+    listener->user_port = is_user;
+    listener->hidden_port = is_hidden; 
     return;
   }
 
@@ -247,6 +272,9 @@
   if (inetport(listener)) {
     listener->active = 1;
     listener->next   = ListenerPollList;
+    listener->server_port = is_server;
+    listener->user_port = is_user;
+    listener->hidden_port = is_hidden; 
     ListenerPollList = listener; 
   }
   else
diff -ruN -x configure -x *~ -x ircd-hybrid-6.0.orig -x *.rej ircd-hybrid-6.0.orig/src/s_conf.c ircd-hybrid-6.0/src/s_conf.c
--- ircd-hybrid-6.0.orig/src/s_conf.c	Sun Feb 18 12:32:24 2001
+++ ircd-hybrid-6.0/src/s_conf.c	Sun Feb 18 12:31:37 2001
@@ -2197,12 +2197,36 @@
        * P: line - listener port
        */
       if ( aconf->status & CONF_LISTEN_PORT)
-        {
-          dontadd = 1;
-          if((aconf->passwd[0] == '\0') || (aconf->passwd[0] == '*'))
+	 {
+	    int is_server = 0;
+	    int is_user = 0;
+	    int is_hidden = 0;
+	    char *p = aconf->user;
+	    
+	    
+	    dontadd = 1;
+/*          if((aconf->passwd[0] == '\0') || (aconf->passwd[0] == '*'))
             add_listener(aconf->port, NULL );
           else
-            add_listener(aconf->port, (const char *)aconf->passwd);
+            add_listener(aconf->port, (const char *)aconf->passwd); */
+	    /* if neither S nor U, allow anyone to connect */
+	    if (!*p) {
+	       is_server = 1;
+	       is_user = 1;
+	    } else
+	      while(*p) {
+		 switch(*p) {
+		  case 'S': { is_server = 1; break; }
+		  case 'U': { is_user = 1; break; }
+		  case 'H': { is_hidden = 1; break; }
+		    
+		 }
+		 p++;
+		 
+	      }
+	    
+	    add_listener(aconf->port, (const char *)aconf->passwd, is_server, is_user, is_hidden);
+	    
         }
       else if(aconf->status & CONF_CLIENT_MASK)
         {
