Patch to original IRCnet ircd-irc2-2.11.2p2 to add -Chans which behave exactly like +Chans (modeless), but allow setting a Topic. Author: Andreas 'APic' Pickart Credits to all Contributors to ircd License: GPL diff a/common/struct_def.h b/common/struct_def.h --- a/common/struct_def.h +++ b/common/struct_def.h @@ -771,9 +771,10 @@ struct Channel { #define IsMember(u, c) (u && (u)->user && \ find_channel_link((u)->user->channel, c) ? 1 : 0) # define IsChannelName(n) ((n) && (*(n) == '#' || *(n) == '&' ||\ - *(n) == '+' || \ + *(n) == '+' || *(n) == '-' || \ (*(n) == '!' && cid_ok(n, CHIDLEN)))) #define IsQuiet(x) ((x)->mode.mode & MODE_QUIET) +#define UseTopic(n) ((n) && (*(n) == '-')) #define UseModes(n) ((n) && (*(n) == '#' || *(n) == '&' || \ *(n) == '!')) diff a/common/support.c b/common/support.c --- a/common/support.c +++ b/common/support.c @@ -808,8 +808,8 @@ char **make_isupport(void) /* Warning: There must be up to 12 tokens in each string */ tis[0] = (char *) MyMalloc(BUFSIZE); sprintf(tis[0], - "RFC2812 PREFIX=(ov)@+ CHANTYPES=#&!+ MODES=%d " - "CHANLIMIT=#&!+:%d " + "RFC2812 PREFIX=(ov)@+ CHANTYPES=#&!+- MODES=%d " + "CHANLIMIT=#&!+-:%d " "NICKLEN=%d TOPICLEN=%d KICKLEN=%d MAXLIST=beIR:%d " "CHANNELLEN=%d IDCHAN=!:%d CHANMODES=beIR,k,l,imnpstaqr", MAXMODEPARAMS, MAXCHANNELSPERUSER, diff a/ircd/channel.c b/ircd/channel.c --- a/ircd/channel.c +++ b/ircd/channel.c @@ -3161,7 +3161,7 @@ int m_topic(aClient *cptr, aClient *sptr, int parc, char *parv[]) parv[0], name); continue; } - if (!UseModes(name)) + if (!UseModes(name) && !UseTopic(name)) { sendto_one(sptr, replies[ERR_NOCHANMODES], ME, parv[0], name);