if (!(flags=rcuplist->flags & flagmask))
continue;
+ /* If you're listing yourself, we should show personal flags too */
+ if (rcuplist==rcup) {
+ flags=rcuplist->flags & (flagmask | QCUFLAGS_PERSONAL);
+ }
+
if (!donehead) {
chanservstdmessage(sender, QM_CHANLEVHEADER, cip->name->content);
if (showtimes)
} else {
changemask=0;
- /* Everyone can change their own flags (except +dqb), and turn +iwj on/off */
+ /* Everyone can change their own flags (except +dqb), and control personal flags */
if (rcup==rcuplist) {
- changemask = (rcup->flags | QCUFLAG_HIDEWELCOME | QCUFLAG_HIDEINFO | QCUFLAG_AUTOINVITE) &
+ changemask = (rcup->flags | QCUFLAGS_PERSONAL) &
~(QCUFLAG_BANNED | QCUFLAG_DENY | QCUFLAG_QUIET);
- flagmask |= (QCUFLAG_HIDEWELCOME | QCUFLAG_HIDEINFO | QCUFLAG_AUTOINVITE);
+ flagmask |= QCUFLAGS_PERSONAL;
}
/* Masters are allowed to manipulate +ovagtbqdpk */
if (!CUIsOp(rcuplist) && !CUIsVoice(rcuplist))
rcuplist->flags &= ~QCUFLAG_PROTECT;
+ /* Unknown users aren't allowed personal flags */
+ if (!CUKnown(rcuplist))
+ rcuplist->flags &= ~QCUFLAGS_PERSONAL;
+
/* Check if anything "significant" has changed */
if ((oldflags ^ rcuplist->flags) & (QCUFLAG_OWNER | QCUFLAG_MASTER | QCUFLAG_OP))
rcuplist->changetime=time(NULL);
#define QCUFLAG_SELFCON (QCUFLAG_OP | QCUFLAG_VOICE | QCUFLAG_AUTOOP | QCUFLAG_AUTOVOICE | \
QCUFLAG_TOPIC | QCUFLAG_HIDEINFO)
+#define QCUFLAGS_PERSONAL (QCUFLAG_HIDEINFO | QCUFLAG_HIDEWELCOME | QCUFLAG_AUTOINVITE)
+
#define QCUFLAG_ALL 0xffff
#define CUIsOwner(x) ((x)->flags & QCUFLAG_OWNER)