[srvx-commits] CVS: services/src chanserv.c,1.277,1.278
Brought to you by:
entrope
|
From: Adrian D. <sai...@us...> - 2002-09-04 19:55:26
|
Update of /cvsroot/srvx/services/src
In directory usw-pr-cvs1:/tmp/cvs-serv20427
Modified Files:
chanserv.c
Log Message:
Don't let users get around account DNRs using !giveownership
Index: chanserv.c
===================================================================
RCS file: /cvsroot/srvx/services/src/chanserv.c,v
retrieving revision 1.277
retrieving revision 1.278
diff -C2 -r1.277 -r1.278
*** chanserv.c 26 Aug 2002 22:09:01 -0000 1.277
--- chanserv.c 4 Sep 2002 19:55:22 -0000 1.278
***************
*** 125,132 ****
/* Do-not-register channels */
! #define CSMSG_NOT_DNR "$b%s$b is not a valid channel name or *handle."
#define CSMSG_DNR_INFO "$b%s$b is do-not-register (by $b%s$b): %s"
#define CSMSG_DNR_CHANNEL "Only network staff may register $b%s$b."
#define CSMSG_DNR_CHANNEL_MOVE "Only network staff may move $b%s$b."
#define CSMSG_NOREGISTER_CHANNEL "$b%s$b has been added to the do-not-register list."
#define CSMSG_NO_SUCH_DNR "$b%s$b is not in the do-not-register list."
--- 125,133 ----
/* Do-not-register channels */
! #define CSMSG_NOT_DNR "$b%s$b is not a valid channel name or *account."
#define CSMSG_DNR_INFO "$b%s$b is do-not-register (by $b%s$b): %s"
#define CSMSG_DNR_CHANNEL "Only network staff may register $b%s$b."
#define CSMSG_DNR_CHANNEL_MOVE "Only network staff may move $b%s$b."
+ #define CSMSG_DNR_ACCOUNT "Only network staff may register channels to $b%s$b."
#define CSMSG_NOREGISTER_CHANNEL "$b%s$b has been added to the do-not-register list."
#define CSMSG_NO_SUCH_DNR "$b%s$b is not in the do-not-register list."
***************
*** 5519,5522 ****
--- 5520,5524 ----
struct chanData *cData = channel->channel_info;
unsigned int force;
+ struct do_not_register *dnr;
REQUIRE_PARAMS(2);
***************
*** 5554,5557 ****
--- 5556,5570 ----
{
chanserv_notice(user, CSMSG_OWN_TOO_MANY, new_owner_hi->handle, chanserv_conf.max_owned);
+ return 0;
+ }
+ if((dnr = chanserv_is_dnr(NULL, new_owner_hi)) && !force) {
+ if(IsPrivileged(user))
+ {
+ chanserv_notice(user, CSMSG_DNR_INFO, dnr->chan_name, dnr->setter, dnr->reason);
+ }
+ else
+ {
+ chanserv_notice(user, CSMSG_DNR_ACCOUNT, new_owner_hi->handle);
+ }
return 0;
}
|