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
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
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 */
if (is_ipmask)
SetGlineIsIpMask(agline);
-#ifdef WT_BADCHAN
+#ifdef BADCHAN
if(gtype)
{ agline->next = badchan; /* link it into the list */
return (badchan = agline);
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;
}
RunFree(agline);
}
-#ifdef WT_BADCHAN
+#ifdef BADCHAN
int bad_channel(char *name)
{ aGline *agline;
aGline *agline;
int fd,gtype=0;
-#ifdef WT_BADCHAN
- if(*host=='#')
+#ifdef BADCHAN
+ if(*host=='#' || *host == '&' || *host == '+')
gtype=1; /* BAD CHANNEL */
#endif
/* Inform ops */
if (local)
SetGlineIsLocal(agline);
-#ifdef WT_BADCHAN
+#ifdef BADCHAN
if(gtype) return;
#endif
a2gline = agline;
}
-#ifdef WT_BADCHAN
+#ifdef BADCHAN
/* Remove expired bad channels */
for (agline = badchan, a2gline = NULL; agline; agline = agline->next)
{
*(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;
*(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 */
#ifdef VIRTUAL_HOST
'v',
#endif
-#ifdef WT_BADCHAN
+#ifdef BADCHAN
'W',
-#ifdef WT_LOCAL_BADCHAN
- 't',
+#ifdef LOCAL_BADCHAN
+ 'w',
#endif
#endif
#ifdef UNIXPORT
/* 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 */