From: Danny Mitchell Date: Sun, 28 Nov 1999 05:44:17 +0000 (+0000) Subject: Author: WT X-Git-Url: http://git.pk910.de/?a=commitdiff_plain;h=e44343128ccfa8f5c16dd0332984974dd308c1bc;p=ircu2.10.12-pk.git Author: WT 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 --- diff --git a/ircd/channel.c b/ircd/channel.c index cbd44d9..133d1ee 100644 --- a/ircd/channel.c +++ b/ircd/channel.c @@ -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 diff --git a/ircd/list.c b/ircd/list.c index 2e4a23b..d39c39b 100644 --- a/ircd/list.c +++ b/ircd/list.c @@ -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; diff --git a/ircd/opercmds.c b/ircd/opercmds.c index 96e8d51..a04ba0f 100644 --- a/ircd/opercmds.c +++ b/ircd/opercmds.c @@ -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 */ diff --git a/ircd/s_debug.c b/ircd/s_debug.c index 9a4b051..b6fa0f6 100644 --- a/ircd/s_debug.c +++ b/ircd/s_debug.c @@ -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 diff --git a/ircd/s_err.c b/ircd/s_err.c index ec40bd0..8b2b589 100644 --- a/ircd/s_err.c +++ b/ircd/s_err.c @@ -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 */