[srvx-commits] CVS: services/src proto-p10.c,1.46,1.47
Brought to you by:
entrope
|
From: Entrope <en...@us...> - 2002-12-14 02:02:43
|
Update of /cvsroot/srvx/services/src
In directory sc8-pr-cvs1:/tmp/cvs-serv8922/src
Modified Files:
proto-p10.c
Log Message:
since AddChannel() should always succeed now, only check whether AddChannelUser() returns NULL
Index: proto-p10.c
===================================================================
RCS file: /cvsroot/srvx/services/src/proto-p10.c,v
retrieving revision 1.46
retrieving revision 1.47
diff -C2 -r1.46 -r1.47
*** proto-p10.c 12 Dec 2002 03:32:56 -0000 1.46
--- proto-p10.c 14 Dec 2002 02:02:40 -0000 1.47
***************
*** 854,870 ****
{
struct create_desc *cd = data;
- struct chanNode *cn;
-
/* We can't assume the channel create was allowed because of the
* bad-word channel checking.
*/
! cn = AddChannel(name, cd->when, NULL, NULL);
! if (cn) {
! struct modeNode *mn = AddChannelUser(cd->user, cn);
! /* We can't assume the user got ops, or that the single
! * user in the channel is the user who joined either.
! */
! if ((cn->members.used == 1) && mn) mn->modes = MODE_CHANOP;
! }
}
--- 854,863 ----
{
struct create_desc *cd = data;
/* We can't assume the channel create was allowed because of the
* bad-word channel checking.
*/
! struct chanNode *cn = AddChannel(name, cd->when, NULL, NULL);
! struct modeNode *mn = AddChannelUser(cd->user, cn);
! if (mn && (cn->members.used == 1)) mn->modes = MODE_CHANOP;
}
***************
*** 1825,1830 ****
/* remove user from all channels */
! for (n=user->channels.used; n>0;) {
! DelChannelUser(user, user->channels.list[--n]->channel, false, 0);
}
--- 1818,1823 ----
/* remove user from all channels */
! while (user->channels.used > 0) {
! DelChannelUser(user, user->channels.list[user->channels.used-1]->channel, false, 0);
}
|