Author: WT
authorDanny Mitchell <danny@chatsystems.com>
Sun, 28 Nov 1999 05:44:17 +0000 (05:44 +0000)
committerDanny Mitchell <danny@chatsystems.com>
Sun, 28 Nov 1999 05:44:17 +0000 (05:44 +0000)
Log message:

 Cleaning things up a bit.
 Yeah, before you gripe about it, I ran the idea of using the numeric
 past thomas, he agreed, although its used on efnet, no reason to waste it
 when it means something simular here.

git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/trunk@9 c9e4aea6-c8fd-4c43-8297-357d70d61c8c

ircd/channel.c
ircd/list.c
ircd/opercmds.c
ircd/s_debug.c
ircd/s_err.c

index cbd44d92202f1beb158d6e3f9aa48d5a3d8516f2..133d1ee12bb9d369b3d1f3ca21458323f8ce84da 100644 (file)
@@ -2264,10 +2264,10 @@ int m_join(aClient *cptr, aClient *sptr, int parc, char *parv[])
 
       if (MyConnect(sptr))
       { 
-#ifdef WT_BADCHAN
+#ifdef BADCHAN
         if(bad_channel(name) && !IsAnOper(sptr))
         {
-         sendto_one(sptr, err_str(ERR_CHANNELISFULL), me.name, parv[0],name);
+         sendto_one(sptr, err_str(ERR_BADCHANNAME), me.name, parv[0],name);
          continue;
         }
 #endif
index 2e4a23bcafa79a34be70ffea403a4076ede35ab6..d39c39b99c10e211c0421f33765143a67f55278a 100644 (file)
@@ -389,9 +389,10 @@ aGline *make_gline(int is_ipmask, char *host, char *reason,
     char *name, time_t expire)
 {
   Reg4 aGline *agline;
-#ifdef WT_BADCHAN
+#ifdef BADCHAN
   int gtype=0;
-  if(*host == '#') gtype=1; /* BAD CHANNEL GLINE */
+  if(*host == '#' || *host == '&' || *host == '+') 
+    gtype=1; /* BAD CHANNEL GLINE */
 #endif
 
   agline = (struct Gline *)RunMalloc(sizeof(aGline));  /* alloc memory */
@@ -403,7 +404,7 @@ aGline *make_gline(int is_ipmask, char *host, char *reason,
   if (is_ipmask)
     SetGlineIsIpMask(agline);
 
-#ifdef WT_BADCHAN
+#ifdef BADCHAN
   if(gtype)
   { agline->next = badchan;            /* link it into the list */
     return (badchan = agline);
@@ -454,8 +455,8 @@ void free_gline(aGline *agline, aGline *pgline)
     pgline->next = agline->next;       /* squeeze agline out */
   else
   { 
-#ifdef WT_BADCHAN
-    if(*agline->host =='#')
+#ifdef BADCHAN
+    if(*agline->host =='#' || *agline->host == '&' || *agline->host == '+')
     {
       badchan = agline->next;
     }
@@ -470,7 +471,7 @@ void free_gline(aGline *agline, aGline *pgline)
   RunFree(agline);
 }
 
-#ifdef WT_BADCHAN
+#ifdef BADCHAN
 int bad_channel(char *name)
 { aGline *agline;
 
index 96e8d5158181dc4d086eee5ea5adda0bedb8e8c9..a04ba0fe96eff08dc6a5fb1c5147df57edd08906 100644 (file)
@@ -1472,8 +1472,8 @@ static void add_gline(aClient *sptr, int ip_mask, char *host, char *comment,
   aGline *agline;
   int fd,gtype=0;
 
-#ifdef WT_BADCHAN
-  if(*host=='#')
+#ifdef BADCHAN
+  if(*host=='#' || *host == '&' || *host == '+')
     gtype=1;   /* BAD CHANNEL */
 #endif
   /* Inform ops */
@@ -1498,7 +1498,7 @@ static void add_gline(aClient *sptr, int ip_mask, char *host, char *comment,
   if (local)
     SetGlineIsLocal(agline);
 
-#ifdef WT_BADCHAN
+#ifdef BADCHAN
   if(gtype) return;
 #endif
 
@@ -1576,7 +1576,7 @@ int m_gline(aClient *cptr, aClient *sptr, int parc, char *parv[])
     a2gline = agline;
   }
 
-#ifdef WT_BADCHAN
+#ifdef BADCHAN
   /* Remove expired bad channels */
   for (agline = badchan, a2gline = NULL; agline; agline = agline->next)
   {
@@ -1653,8 +1653,9 @@ int m_gline(aClient *cptr, aClient *sptr, int parc, char *parv[])
        *(host++) = '\0';       /* break up string at the '@' */
       }
       ip_mask = check_if_ipmask(host); /* Store this boolean */
-#ifdef WT_BADCHAN
-      if(*host == '#') gtype=1;                /* BAD CHANNEL GLINE */
+#ifdef BADCHAN
+      if(*host=='#' || *host == '&' || *host == '+')
+        gtype=1;               /* BAD CHANNEL GLINE */
 #endif
 
       for (agline = (gtype)?badchan:gline, a2gline = NULL; agline; 
@@ -1767,9 +1768,9 @@ int m_gline(aClient *cptr, aClient *sptr, int parc, char *parv[])
       *(host++) = '\0';                /* break up string at the '@' */
     }
     ip_mask = check_if_ipmask(host);   /* Store this boolean */
-#ifdef WT_BADCHAN
-    if(*host == '#')
-#ifndef WT_LOCAL_BADCHAN
+#ifdef BADCHAN
+    if(*host=='#' || *host == '&' || *host == '+')
+#ifndef LOCAL_BADCHAN
      return 0;
 #else
      gtype=1;  /* BAD CHANNEL */
index 9a4b0519ab58917e89d6bc1c2f3d5c834c60ff26..b6fa0f6ea05691458354cf8a17ed9c11988cf86c 100644 (file)
@@ -158,10 +158,10 @@ char serveropts[] = {
 #ifdef VIRTUAL_HOST
     'v',
 #endif
-#ifdef WT_BADCHAN
+#ifdef BADCHAN
    'W',
-#ifdef WT_LOCAL_BADCHAN
-   't',
+#ifdef LOCAL_BADCHAN
+   'w',
 #endif
 #endif
 #ifdef UNIXPORT
index ec40bd07b2bb8f50f0a6bedcad5d36f3a784a26a..8b2b589f771bf42b377203b287d2df64ab84d359 100644 (file)
@@ -220,7 +220,7 @@ static Numeric numeric_errors[] = {
 /* 478 */
     {ERR_BANLISTFULL, "%s %s :Channel ban/ignore list is full"},
 /* 479 */
-    {0, (char *)NULL},
+    {ERR_BADCHANNAME, "%s :Cannot join channel (access denied on this server)"},
 /* 480 */
     {0, (char *)NULL},
 /* 481 */