[ircd-ratbox] Source audit.
pmiseiko at ncircle.com
Sat Jun 12 00:02:47 EDT 2004
I just recently added a new channel mode to ircd-ratbox 1.5-1 that
mimics the channel mode "c" in TS4 and I noticed two interesting things
while doing this.
First, in sendto_server() you check to see if the channel name starts
with a # or not. While this is excellent in preventing local channel
propagations this is more of a hack then proper coding and an assertion
should be added that fires on an attempt to propagate local channels and
all attempts elsewhere that are in reality bugs, should be fixed.
Secondly, in ms_sjoin() I noticed the following code:
else if(newts == 0 || oldts == 0)
chptr->channelts = tstosend = 0;
chptr->channelts = tstosend = oldts;
The second else if will never see the light of day; the first else if
has stolen the torch of life.
newts = 0; /* ( !newts ) = 1, ( newts == 0 ) = 1... */
More information about the ircd-ratbox