- #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
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 *);
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 *);
{
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.
}
}
-/*
-** 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).
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),
if (MyConnect(sptr))
clean_channelname(name);
- if (check_channelmask(sptr, cptr, name) == -1)
- continue;
if (*name == '0' && !atoi(name))
{
(void)strcpy(jbuf, "0");
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);
if (MyConnect(sptr))
clean_channelname(parv[1]);
- if (check_channelmask(sptr, cptr, parv[1]))
- return 0;
/* bugfix for /knock PRv Please? */
if (*parv[1] != '#')
{
if (MyConnect(sptr))
clean_channelname(parv[1]);
- if (check_channelmask(sptr, cptr, parv[1]))
- return 0;
if (parc < 3)
{
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)
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,