diff -ur ircd-hybrid-6.3.1/include/s_serv.h ircd-hybrid-6.3.1+serv/include/s_serv.h
--- ircd-hybrid-6.3.1/include/s_serv.h	2001-12-09 19:02:09.000000000 +0000
+++ ircd-hybrid-6.3.1+serv/include/s_serv.h	2002-09-09 13:06:21.000000000 +0100
@@ -45,6 +45,7 @@
 #define CAP_EX          0x00000008      /* Can do channel +e exemptions */
 #define CAP_CHW         0x00000010      /* Can do channel wall @# */
 #define CAP_KNOCK	0x00000020
+#define CAP_ALIS        0x00000040
 
 #define DoesCAP(x)      ((x)->caps)
 
diff -ur ircd-hybrid-6.3.1/include/send.h ircd-hybrid-6.3.1+serv/include/send.h
--- ircd-hybrid-6.3.1/include/send.h	2002-02-02 20:58:27.000000000 +0000
+++ ircd-hybrid-6.3.1+serv/include/send.h	2002-09-09 13:52:49.000000000 +0100
@@ -39,6 +39,7 @@
                                  const char *cmd,
                                  const char *message);
 extern  void sendto_serv_butone(struct Client *, const char *, ...);
+extern void sendto_alisserv_butone(struct Client *, const char *, ...);
 extern  void sendto_common_channels(struct Client *, const char *, ...);
 extern  void sendto_channel_butserv(struct Channel *, struct Client *, 
                                     const char *, ...);
@@ -53,6 +54,8 @@
 
 extern  void sendto_match_servs(struct Channel *, struct Client *, 
                                 const char *, ...);
+extern void sendto_alis_servs(struct Channel *, const char *, ...);
+
 extern  void sendto_match_cap_servs(struct Channel *, struct Client *, 
                                     int, const char *, ...);
 extern  void sendto_match_butone(struct Client *, struct Client *, 
diff -ur ircd-hybrid-6.3.1/src/channel.c ircd-hybrid-6.3.1+serv/src/channel.c
--- ircd-hybrid-6.3.1/src/channel.c	2002-02-17 05:58:12.000000000 +0000
+++ ircd-hybrid-6.3.1+serv/src/channel.c	2002-09-09 13:35:21.000000000 +0100
@@ -514,6 +514,8 @@
       ptr->next = who->user->channel;
       who->user->channel = ptr;
       who->user->joined++;
+      sendto_alis_servs(chptr, ":%s CHANNEL %s :%d",
+                        me.name, chptr->chname, chptr->users);
     }
 }
 
@@ -1877,6 +1879,13 @@
       sendto_match_servs(chptr, cptr, ":%s MODE %s %s %s",
                          sptr->name, chptr->chname,
                          modebuf, parabuf);
+
+      *modebuf = *parabuf = '\0';
+      modebuf[1] = '\0';
+
+      channel_modes(&me, modebuf, parabuf, chptr);
+      sendto_alis_servs(chptr, ":%s MODE %s %s %s",
+                        me.name, chptr->chname, modebuf, parabuf);
     }
 
   if(*modebuf_new)
@@ -2071,6 +2080,10 @@
       chptr->users = 0; /* if chptr->users < 0, make sure it sticks at 0
                          * It should never happen but...
                          */
+
+      sendto_alis_servs(chptr, ":%s CHANNEL %s :0",
+                        me.name, chptr->chname);
+
 #ifdef JUPE_CHANNEL
         if(chptr->juped)
           {
@@ -2108,6 +2121,11 @@
           Count.chan--;
         }
     }
+  else
+  {
+    sendto_alis_servs(NULL, ":%s CHANNEL %s :%d",
+                      me.name, chptr->chname, chptr->users);
+  }
 }
 
 /*
@@ -2522,6 +2540,8 @@
               sendto_match_servs(chptr, sptr, 
                                  ":%s MODE %s +nt",
                                  me.name, chptr->chname);
+              sendto_alis_servs(chptr, ":%s MODE %s +nt",
+                                me.name, chptr->chname);
             }
 
           del_invite(sptr, chptr);
@@ -3080,6 +3100,11 @@
               sendto_match_servs(chptr, cptr,":%s TOPIC %s :%s",
                                  parv[0], chptr->chname,
                                  chptr->topic);
+
+              /* ALIS */
+              sendto_alis_servs(chptr, ":%s TOPIC %s :%s",
+                                parv[0], chptr->chname, chptr->topic);
+
               sendto_channel_butserv(chptr, sptr, ":%s TOPIC %s :%s",
                                      parv[0],
                                      chptr->chname, chptr->topic);
@@ -4132,6 +4157,18 @@
         *t = '\0';
       sendto_match_servs(chptr, cptr, "%s", sjbuf);
     }
+
+  /* ALIS */
+  {
+    char modebuf[MODEBUFLEN];
+    char parabuf[MODEBUFLEN];
+
+    *modebuf = *parabuf = '\0';
+    modebuf[1] = '\0';
+    channel_modes(&me, modebuf, parabuf, chptr);
+    sendto_alis_servs(chptr, ":%s MODE %s %s %s",
+                      me.name, chptr->chname, modebuf, parabuf);
+  }
   return 0;
 }
 
diff -ur ircd-hybrid-6.3.1/src/m_kill.c ircd-hybrid-6.3.1+serv/src/m_kill.c
--- ircd-hybrid-6.3.1/src/m_kill.c	2001-07-01 04:13:55.000000000 +0100
+++ ircd-hybrid-6.3.1+serv/src/m_kill.c	2002-09-09 13:54:44.000000000 +0100
@@ -264,7 +264,7 @@
   */
   if (!MyConnect(acptr) || !MyConnect(sptr) || !IsAnOper(sptr))
     {
-      sendto_serv_butone(cptr, ":%s KILL %s :%s!%s",
+      sendto_alisserv_butone(cptr, ":%s KILL %s :%s!%s",
                          parv[0], acptr->name, inpath, path);
       if (chasing && IsServer(cptr))
         sendto_one(cptr, ":%s KILL %s :%s!%s",
diff -ur ircd-hybrid-6.3.1/src/parse.c ircd-hybrid-6.3.1+serv/src/parse.c
--- ircd-hybrid-6.3.1/src/parse.c	2001-12-30 03:25:48.000000000 +0000
+++ ircd-hybrid-6.3.1+serv/src/parse.c	2002-09-09 13:55:03.000000000 +0100
@@ -593,7 +593,7 @@
                            sptr->from->name, get_client_name(cptr, TRUE));
 #endif			   
           }
-        sendto_serv_butone(NULL,
+        sendto_alisserv_butone(NULL,
                            ":%s KILL %s :%s (%s[%s] != %s, Fake Prefix)",
                            me.name, sptr->name, me.name,
                            sptr->name, sptr->from->name,
diff -ur ircd-hybrid-6.3.1/src/s_serv.c ircd-hybrid-6.3.1+serv/src/s_serv.c
--- ircd-hybrid-6.3.1/src/s_serv.c	2002-04-15 23:38:22.000000000 +0100
+++ ircd-hybrid-6.3.1+serv/src/s_serv.c	2002-09-09 13:48:51.000000000 +0100
@@ -74,6 +74,7 @@
   { "EX",       CAP_EX },
   { "CHW",      CAP_CHW },
   { "KNOCK",    CAP_KNOCK },
+  { "ALIS",     CAP_ALIS },
   { 0,   0 }
 };
 
@@ -834,7 +835,9 @@
        yet - must be different each time and !=0, so we
        alternate between 1 and 2 -orabidoo
        */
-    for (chptr = channel; chptr; chptr = chptr->nextch)
+    if(!IsCapable(cptr, CAP_ALIS))
+    {
+      for (chptr = channel; chptr; chptr = chptr->nextch)
       {
         for (l = chptr->members; l; l = l->next)
           {
@@ -846,19 +849,42 @@
                   sendnick_TS(cptr, acptr);
               }
           }
-	send_channel_modes(cptr, chptr);
+
+        send_channel_modes(cptr, chptr);
       }
-    /*
-    ** also send out those that are not on any channel
-    */
-    for (acptr = &me; acptr; acptr = acptr->prev)
-      if (acptr->nicksent != nickissent)
+
+      for (acptr = &me; acptr; acptr = acptr->prev)
+      {
+        if (acptr->nicksent != nickissent)
         {
           acptr->nicksent = nickissent;
           if (acptr->from != cptr)
             sendnick_TS(cptr, acptr);
         }
+      }
+    }
+
+    /* ALIS server */
+    else
+    {
+      char modebuf[MODEBUFLEN];
+      char parabuf[MODEBUFLEN];
+
+      for(chptr = channel; chptr; chptr = chptr->nextch)
+      {
+        if(chptr->users <= 0)
+          continue;
+
+        sendto_one(cptr, ":%s CHANNEL %s :%d",
+                   me.name, chptr->chname, chptr->users);
+
+        *modebuf = *parabuf = '\0';
+        channel_modes(cptr, modebuf, parabuf, chptr);
+        sendto_one(cptr, ":%s MODE %s %s %s",
+                   me.name, chptr->chname, modebuf, parabuf);
+      }
     }
+  }
 
   cptr->flags2 &= ~FLAGS2_CBURST;
 
diff -ur ircd-hybrid-6.3.1/src/s_user.c ircd-hybrid-6.3.1+serv/src/s_user.c
--- ircd-hybrid-6.3.1/src/s_user.c	2002-01-23 18:39:08.000000000 +0000
+++ ircd-hybrid-6.3.1+serv/src/s_user.c	2002-09-09 13:55:54.000000000 +0100
@@ -1377,7 +1377,7 @@
                      nick, cptr->name);
           if (sptr != cptr) /* bad nick change */
             {
-              sendto_serv_butone(cptr,
+              sendto_alisserv_butone(cptr,
                                  ":%s KILL %s :%s (%s <- %s!%s@%s)",
                                  me.name, parv[0], me.name,
 #ifndef HIDE_SERVERS_IPS
@@ -1522,7 +1522,7 @@
                    cptr->name);
 
 #ifndef LOCAL_NICK_COLLIDE
-	    sendto_serv_butone(NULL, /* all servers */
+	    sendto_alisserv_butone(NULL, /* all servers */
 		       ":%s KILL %s :%s (%s(NOUSER) <- %s!%s@%s)(TS:%s)",
 			       me.name,
 			       acptr->name,
@@ -1585,7 +1585,7 @@
        */
 #ifdef LOCAL_NICK_COLLIDE
       /* just propogate it through */
-      sendto_serv_butone(cptr, ":%s NICK %s :%lu",
+      sendto_alisserv_butone(cptr, ":%s NICK %s :%lu",
                          parv[0], nick, sptr->tsinfo);
 #endif
       /*
@@ -1607,7 +1607,7 @@
                      me.name, acptr->name, acptr->name);
 
 #ifndef LOCAL_NICK_COLLIDE
-	  sendto_serv_butone(NULL, /* all servers */
+	  sendto_alisserv_butone(NULL, /* all servers */
 			     ":%s KILL %s :%s (%s <- %s)",
 			     me.name, acptr->name, me.name,
 			     acptr->from->name,
@@ -1656,7 +1656,7 @@
                          me.name, acptr->name, acptr->name);
 
 #ifndef LOCAL_NICK_COLLIDE
-	      sendto_serv_butone(sptr, /* all servers but sptr */
+	      sendto_alisserv_butone(sptr, /* all servers but sptr */
 				 ":%s KILL %s :%s (%s <- %s)",
 				 me.name, acptr->name, me.name,
 				 acptr->from->name,
@@ -1695,7 +1695,7 @@
                  me.name, acptr->name, acptr->name);
 
 #ifndef LOCAL_NICK_COLLIDE
-      sendto_serv_butone(NULL, /* KILL old from outgoing servers */
+      sendto_alisserv_butone(NULL, /* KILL old from outgoing servers */
 			 ":%s KILL %s :%s (%s(%s) <- %s)",
 			 me.name, sptr->name, me.name, acptr->from->name,
 #ifndef HIDE_SERVERS_IPS
@@ -1708,7 +1708,7 @@
       ServerStats->is_kill++;
 
 #ifndef LOCAL_NICK_COLLIDE
-      sendto_serv_butone(NULL, /* Kill new from incoming link */
+      sendto_alisserv_butone(NULL, /* Kill new from incoming link */
 			 ":%s KILL %s :%s (%s <- %s(%s))",
 			 me.name, acptr->name, me.name, acptr->from->name,
 #ifndef HIDE_SERVERS_IPS
@@ -1749,7 +1749,7 @@
           ServerStats->is_kill++;
 
 #ifndef LOCAL_NICK_COLLIDE
-	  sendto_serv_butone(cptr, /* KILL old from outgoing servers */
+	  sendto_alisserv_butone(cptr, /* KILL old from outgoing servers */
 			     ":%s KILL %s :%s (%s(%s) <- %s)",
 			     me.name, sptr->name, me.name, acptr->from->name,
 #ifndef HIDE_SERVERS_IPS
@@ -1789,7 +1789,7 @@
                      me.name, acptr->name, acptr->name);
 
 #ifndef LOCAL_NICK_COLLIDE
-	  sendto_serv_butone(sptr, /* all servers but sptr */
+	  sendto_alisserv_butone(sptr, /* all servers but sptr */
 			     ":%s KILL %s :%s (%s <- %s)",
 			     me.name, acptr->name, me.name,
 			     acptr->from->name,
diff -ur ircd-hybrid-6.3.1/src/send.c ircd-hybrid-6.3.1+serv/src/send.c
--- ircd-hybrid-6.3.1/src/send.c	2002-02-02 20:58:30.000000000 +0000
+++ ircd-hybrid-6.3.1+serv/src/send.c	2002-09-09 14:00:58.000000000 +0100
@@ -725,7 +725,6 @@
 
 void
 sendto_serv_butone(aClient *one, const char *pattern, ...)
-
 {
   va_list args;
   aClient *cptr;
@@ -737,12 +736,35 @@
       if (one && (cptr == one->from))
         continue;
       
+      if(IsCapable(cptr, CAP_ALIS))
+        continue;
+
       vsendto_one(cptr, pattern, args);
     }
 
   va_end(args);
 } /* sendto_serv_butone() */
 
+/* same as sendto_serv_butone but will also send to ALIS servers */
+void
+sendto_alisserv_butone(aClient *one, const char *pattern, ...)
+{
+  va_list args;
+  aClient *cptr;
+
+  va_start(args, pattern);
+  
+  for(cptr = serv_cptr_list; cptr; cptr = cptr->next_server_client)
+    {
+      if (one && (cptr == one->from))
+        continue;
+      
+      vsendto_one(cptr, pattern, args);
+    }
+
+  va_end(args);
+}
+
 /*
  * sendto_common_channels()
  *
@@ -898,7 +920,6 @@
 
 void
 sendto_match_servs(aChannel *chptr, aClient *from, const char *pattern, ...)
-
 {
   va_list args;
   aClient *cptr;
@@ -913,7 +934,7 @@
 
   for(cptr = serv_cptr_list; cptr; cptr = cptr->next_server_client)
     {
-      if (cptr == from)
+      if (cptr == from || IsCapable(cptr, CAP_ALIS))
         continue;
       
       vsendto_one(cptr, pattern, args);
@@ -923,6 +944,32 @@
 
 } /* sendto_match_servs() */
 
+/* send to all matching alis servers */
+void
+sendto_alis_servs(aChannel *chptr, const char *pattern, ...)
+{
+  va_list args;
+  aClient *cptr;
+
+  if (chptr)
+    {
+      if (*chptr->chname == '&')
+        return;
+    }
+
+  va_start(args, pattern);
+
+  for(cptr = serv_cptr_list; cptr; cptr = cptr->next_server_client)
+    {
+      if (!IsCapable(cptr, CAP_ALIS))
+        continue;
+      
+      vsendto_one(cptr, pattern, args);
+    }
+
+  va_end(args);
+}
+
 /*
  * sendto_match_cap_servs
  *
@@ -1319,7 +1366,7 @@
                  from->name, from->username, from->host,
                  to->from->name);
       
-      sendto_serv_butone(NULL, ":%s KILL %s :%s (%s[%s@%s] Ghosted %s)",
+      sendto_alisserv_butone(NULL, ":%s KILL %s :%s (%s[%s@%s] Ghosted %s)",
                          me.name, to->name, me.name, to->name,
                          to->username, to->host, to->from->name);
 
