* librb is no longer a separately configured subproject.
* charybdis is now a standalone directory with a binary.
* Include path layout now requires a directory ircd/ rb/ etc.
channel mode classification which is required by RPL_MYINFO indicating arity,
and RPL_ISUPPORT indicating an enumerated class. The content of these replies
had previously been generated by hardcoded strings of some letters.
Channel modes require classification which corresponds to the
CHANMODES= data in RPL_ISUPPORT. Classes A,B,C can then be
listed in the unary column of RPL_MYINFO. cflag_add() is updated
for this. Additional cleanup of chmode.h and channel.h
circularity is also proffered within.
Submitted-by: Jason Volk <jason@zemos.net>
Charybdis requires C99 already, so it's high time we start using
stdbool. I've converted a few pieces of code already.
A lot of the old code that uses YES/NO should probably be updated too
because that's fucking hideous.
We're setting flags to flags_list[3] at the end of the loop, but the
array only has 3 elements. Unless the compiler optimises this away
(because flags will not be used again) we're accessing memory beyond
the end of the array.
With gcc-4.9:
chmode.c: In function 'set_channel_mode':
chmode.c:1548:54: warning: iteration 2u invokes undefined behavior [-Waggressive-loop-optimizations]
for(j = 0, flags = flags_list[0]; j < 3; j++, flags = flags_list[j])
^
chmode.c:1548:2: note: containing loop
for(j = 0, flags = flags_list[0]; j < 3; j++, flags = flags_list[j])
Explicitly set "flags = flags_list[j]" at the start of each loop
iteration, which will avoid referencing off the end of the array.