[srvx-commits] CVS: services/src chanserv.c,1.235,1.236
Brought to you by:
entrope
|
From: Entrope <en...@us...> - 2002-07-02 01:21:07
|
Update of /cvsroot/srvx/services/src
In directory usw-pr-cvs1:/tmp/cvs-serv5289/src
Modified Files:
chanserv.c
Log Message:
make privileged note types visible (in !help note types) to privileged users
Index: chanserv.c
===================================================================
RCS file: /cvsroot/srvx/services/src/chanserv.c,v
retrieving revision 1.235
retrieving revision 1.236
diff -C2 -r1.235 -r1.236
*** chanserv.c 2 Jul 2002 00:04:28 -0000 1.235
--- chanserv.c 2 Jul 2002 00:33:14 -0000 1.236
***************
*** 1134,1137 ****
--- 1134,1139 ----
}
+ static int note_type_visible_to_user(struct chanData *channel, struct note_type *ntype, struct userNode *user);
+
static struct note *
chanserv_add_channel_note(struct chanData *channel, struct note_type *type, const char *setter, const char *text)
***************
*** 1404,1408 ****
int row;
! if(ntype->visible_type == NOTE_VIS_PRIVILEGED) continue;
row = exp.value.table.length++;
exp.value.table.contents[row] = calloc(exp.value.table.width, sizeof(char*));
--- 1406,1410 ----
int row;
! if(!note_type_visible_to_user(NULL, ntype, message_dest)) continue;
row = exp.value.table.length++;
exp.value.table.contents[row] = calloc(exp.value.table.width, sizeof(char*));
***************
*** 4664,4669 ****
{
case NOTE_VIS_ALL: return 1;
! case NOTE_VIS_CHANNEL_USERS: return !channel || (user->handle_info && GetChannelUser(channel, user->handle_info));
! case NOTE_VIS_PRIVILEGED: default: return IsOper(user) || IsSupportHelper(user) || IsNetworkHelper(user);
}
}
--- 4666,4671 ----
{
case NOTE_VIS_ALL: return 1;
! case NOTE_VIS_CHANNEL_USERS: return !channel || !user || (user->handle_info && GetChannelUser(channel, user->handle_info));
! case NOTE_VIS_PRIVILEGED: default: return user && (IsOper(user) || IsSupportHelper(user) || IsNetworkHelper(user));
}
}
|