]> jfr.im git - irc/unrealircd/unrealircd.git/commitdiff
- #0003281 regarding removing masked channels, this will make channels with
authorstskeeps <redacted>
Wed, 25 Apr 2007 17:37:05 +0000 (17:37 +0000)
committerstskeeps <redacted>
Wed, 25 Apr 2007 17:37:05 +0000 (17:37 +0000)
  :'s in them not be backwards compatible with 3.2.*, patch by WolfSage

Changes
include/h.h
src/channel.c
src/modules/m_invite.c
src/modules/m_join.c
src/modules/m_kick.c
src/modules/m_knock.c
src/modules/m_mode.c
src/modules/m_part.c
src/modules/m_sajoin.c

diff --git a/Changes b/Changes
index 5dd43cffd317cca29487e0c34de71e91b49d466b..5bc40b02cd095a080021cfd4432a4da0063b8b6c 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1625,3 +1625,5 @@ MOTDs
 - #0003294 reported by Bock, patched by aegis regarding a problem with make
   install, that also cleans up the stuff to install a bit, with adding a
   variable to determine what should be copied.
+- #0003281 regarding removing masked channels, this will make channels with
+  :'s in them not be backwards compatible with 3.2.*, patch by WolfSage
index 06ccd0c35f0a2546d7f6c31491f8411be6e9ac8a..88600d970d9e9e94ce909698a23b99060b8ebcfc 100644 (file)
@@ -656,7 +656,6 @@ extern char *our_strcasestr(char *haystack, char *needle);
 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 43b39da03b86d8c9d131e8a0bd9d7b64f2d6f3b0..13f780919fede8b039816b060d7fc681ad1e2513 100644 (file)
@@ -63,7 +63,6 @@ extern int lifesux;
 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 @@ void clean_channelname(char *cn)
 {
        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.
@@ -1121,28 +1119,6 @@ void clean_channelname(char *cn)
                }
 }
 
-/*
-** 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 6179ba4f09c1a00044d31d94486361331eda099f..cc526fc7e1eee6421408adcd0846893012e1a102 100644 (file)
@@ -125,9 +125,6 @@ DLLFUNC CMD_FUNC(m_invite)
         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 0e932126a8a05b52299da694e1016d2f9b17c064..82d00d75971f73ac7efbdfad1f9671d867f0dc04 100644 (file)
@@ -431,8 +431,6 @@ DLLFUNC CMD_FUNC(_do_join)
 
                if (MyConnect(sptr))
                        clean_channelname(name);
-               if (check_channelmask(sptr, cptr, name) == -1)
-                       continue;
                if (*name == '0' && !atoi(name))
                {
                        (void)strcpy(jbuf, "0");
index 07c253b91883678fa6aff7ce5c5f41ca39806a9f..da5f618d874247131811be405de3b75764bfbccd 100644 (file)
@@ -125,8 +125,6 @@ CMD_FUNC(m_kick)
                            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 5ed82be3c5518db1d0c64e709d3e9cc72b7e3e5f..a4b74b3966645495bb9d92ccb40d7e67f097fa4b 100644 (file)
@@ -104,8 +104,6 @@ CMD_FUNC(m_knock)
        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 e6c4381be4a3eabfba3f981a74af588d49b2394b..a7df0c4a7298c0afa1312f83dff760bf53be3dcc 100644 (file)
@@ -149,8 +149,6 @@ CMD_FUNC(m_mode)
 
        if (MyConnect(sptr))
                clean_channelname(parv[1]);
-       if (check_channelmask(sptr, cptr, parv[1]))
-               return 0;
 
        if (parc < 3)
        {
index 48978d20359ada4414e6e474940047e955077b96..620f8f822aae7d4bf9173719e9dfaaa33fe71766 100644 (file)
@@ -129,8 +129,6 @@ DLLFUNC CMD_FUNC(m_part)
                            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 d860a9878e8105ca88340a423d67145370bb11fd..24441a5d5ea7f3f8c892a5a0c3f86cba666049bf 100644 (file)
@@ -135,8 +135,7 @@ DLLFUNC CMD_FUNC(m_sajoin)
                                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,