? channel_masks.patch
? r_channel_masks.patch
Index: include/h.h
===================================================================
RCS file: /home/cmunk/ircsystems/cvsroot/unreal/include/h.h,v
retrieving revision 1.1.1.1.6.1.2.191
diff -u -r1.1.1.1.6.1.2.191 h.h
--- include/h.h	24 Apr 2007 09:43:01 -0000	1.1.1.1.6.1.2.191
+++ include/h.h	25 Apr 2007 00:15:48 -0000
@@ -656,7 +656,6 @@
 extern int spamfilter_getconftargets(char *s);
 extern void remove_oper_snomasks(aClient *sptr);
 extern char *spamfilter_inttostring_long(int v);
-extern int check_channelmask(aClient *, aClient *, char *);
 extern aChannel *get_channel(aClient *cptr, char *chname, int flag);
 extern MODVAR char backupbuf[];
 extern void add_invite(aClient *, aChannel *);
Index: src/channel.c
===================================================================
RCS file: /home/cmunk/ircsystems/cvsroot/unreal/src/channel.c,v
retrieving revision 1.1.1.1.6.1.2.325
diff -u -r1.1.1.1.6.1.2.325 channel.c
--- src/channel.c	29 Aug 2006 13:25:41 -0000	1.1.1.1.6.1.2.325
+++ src/channel.c	25 Apr 2007 00:15:49 -0000
@@ -63,7 +63,6 @@
 void add_invite(aClient *, aChannel *);
 char *clean_ban_mask(char *, int, aClient *);
 void channel_modes(aClient *, char *, char *, aChannel *);
-int check_channelmask(aClient *, aClient *, char *);
 
 void sub1_from_channel(aChannel *);
 
@@ -1105,7 +1104,6 @@
 {
 	u_char *ch = (u_char *)cn;
 
-
 	for (; *ch; ch++)
 		/* Don't allow any control chars, the space, the comma,
 		 * or the "non-breaking space" in channel names.
@@ -1122,28 +1120,6 @@
 }
 
 /*
-** Return -1 if mask is present and doesnt match our server name.
-*/
-int check_channelmask(aClient *sptr, aClient *cptr, char *chname)
-{
-	char *s;
-
-	s = rindex(chname, ':');
-	if (!s)
-		return 0;
-
-	s++;
-	if (match(s, me.name) || (IsServer(cptr) && match(s, cptr->name)))
-	{
-		if (MyClient(sptr))
-			sendto_one(sptr, err_str(ERR_BADCHANMASK),
-			    me.name, sptr->name, chname);
-		return -1;
-	}
-	return 0;
-}
-
-/*
 **  Get Channel block for i (and allocate a new channel
 **  block, if it didn't exists before).
 */
Index: src/modules/m_invite.c
===================================================================
RCS file: /home/cmunk/ircsystems/cvsroot/unreal/src/modules/Attic/m_invite.c,v
retrieving revision 1.1.2.5
diff -u -r1.1.2.5 m_invite.c
--- src/modules/m_invite.c	12 Nov 2006 20:27:37 -0000	1.1.2.5
+++ src/modules/m_invite.c	25 Apr 2007 00:15:49 -0000
@@ -125,9 +125,6 @@
         if (MyConnect(sptr))
                 clean_channelname(parv[2]);
 
-        if (check_channelmask(sptr, cptr, parv[2]))
-                return -1;
-
         if (!(chptr = find_channel(parv[2], NullChn)))
         {
                 sendto_one(sptr, err_str(ERR_NOSUCHCHANNEL),
Index: src/modules/m_join.c
===================================================================
RCS file: /home/cmunk/ircsystems/cvsroot/unreal/src/modules/Attic/m_join.c,v
retrieving revision 1.1.6.7
diff -u -r1.1.6.7 m_join.c
--- src/modules/m_join.c	16 Dec 2006 16:56:32 -0000	1.1.6.7
+++ src/modules/m_join.c	25 Apr 2007 00:15:49 -0000
@@ -431,8 +431,6 @@
 
 		if (MyConnect(sptr))
 			clean_channelname(name);
-		if (check_channelmask(sptr, cptr, name) == -1)
-			continue;
 		if (*name == '0' && !atoi(name))
 		{
 			(void)strcpy(jbuf, "0");
Index: src/modules/m_kick.c
===================================================================
RCS file: /home/cmunk/ircsystems/cvsroot/unreal/src/modules/Attic/m_kick.c,v
retrieving revision 1.1.2.5
diff -u -r1.1.2.5 m_kick.c
--- src/modules/m_kick.c	21 Aug 2006 23:03:31 -0000	1.1.2.5
+++ src/modules/m_kick.c	25 Apr 2007 00:15:50 -0000
@@ -125,8 +125,6 @@
 			    me.name, parv[0], name);
 			continue;
 		}
-		if (check_channelmask(sptr, cptr, name))
-			continue;
 		/* Store "sptr" access flags */
 		if (IsPerson(sptr))
 			sptr_flags = get_access(sptr, chptr);
Index: src/modules/m_knock.c
===================================================================
RCS file: /home/cmunk/ircsystems/cvsroot/unreal/src/modules/Attic/m_knock.c,v
retrieving revision 1.1.2.5
diff -u -r1.1.2.5 m_knock.c
--- src/modules/m_knock.c	19 Aug 2006 22:28:44 -0000	1.1.2.5
+++ src/modules/m_knock.c	25 Apr 2007 00:15:50 -0000
@@ -104,8 +104,6 @@
 	if (MyConnect(sptr))
 		clean_channelname(parv[1]);
 
-	if (check_channelmask(sptr, cptr, parv[1]))
-		return 0;
 	/* bugfix for /knock PRv Please? */
 	if (*parv[1] != '#')
 	{
Index: src/modules/m_mode.c
===================================================================
RCS file: /home/cmunk/ircsystems/cvsroot/unreal/src/modules/Attic/m_mode.c,v
retrieving revision 1.1.6.9
diff -u -r1.1.6.9 m_mode.c
--- src/modules/m_mode.c	29 Sep 2006 19:45:59 -0000	1.1.6.9
+++ src/modules/m_mode.c	25 Apr 2007 00:15:51 -0000
@@ -149,8 +149,6 @@
 
 	if (MyConnect(sptr))
 		clean_channelname(parv[1]);
-	if (check_channelmask(sptr, cptr, parv[1]))
-		return 0;
 
 	if (parc < 3)
 	{
Index: src/modules/m_part.c
===================================================================
RCS file: /home/cmunk/ircsystems/cvsroot/unreal/src/modules/Attic/m_part.c,v
retrieving revision 1.1.6.4
diff -u -r1.1.6.4 m_part.c
--- src/modules/m_part.c	3 Dec 2006 20:49:56 -0000	1.1.6.4
+++ src/modules/m_part.c	25 Apr 2007 00:15:51 -0000
@@ -129,8 +129,6 @@
 			    me.name, parv[0], name);
 			continue;
 		}
-		if (check_channelmask(sptr, cptr, name))
-			continue;
 
 		/* 'commentx' is the general part msg, but it can be changed
 		 * per-channel (eg some chans block badwords, strip colors, etc)
Index: src/modules/m_sajoin.c
===================================================================
RCS file: /home/cmunk/ircsystems/cvsroot/unreal/src/modules/Attic/m_sajoin.c,v
retrieving revision 1.1.2.7
diff -u -r1.1.2.7 m_sajoin.c
--- src/modules/m_sajoin.c	29 Sep 2006 19:45:59 -0000	1.1.2.7
+++ src/modules/m_sajoin.c	25 Apr 2007 00:15:51 -0000
@@ -135,8 +135,7 @@
 				parted = 1;
 				continue;
 			}
-			if (check_channelmask(sptr, cptr, name) == -1 || *name == '0' ||
-			    !IsChannelName(name))
+			if (*name == '0' || !IsChannelName(name))
 			{
 				sendto_one(sptr,
 				    err_str(ERR_NOSUCHCHANNEL), me.name,
