Update of /cvsroot/srvx/services/src
In directory usw-pr-cvs1:/tmp/cvs-serv9482/src
Modified Files:
chanserv.c
Log Message:
Impose a minimum duration length for the trim command and hoist a test for burst above the ban check in handle_join().
Index: chanserv.c
===================================================================
RCS file: /cvsroot/srvx/services/src/chanserv.c,v
retrieving revision 1.290
retrieving revision 1.291
diff -C2 -r1.290 -r1.291
*** chanserv.c 15 Oct 2002 00:46:38 -0000 1.290
--- chanserv.c 16 Oct 2002 03:34:30 -0000 1.291
***************
*** 178,182 ****
#define CSMSG_CANNOT_DEL "You lack sufficient access to delete users."
#define CSMSG_CANNOT_CLVL "You lack sufficient access to modify users' access."
! #define CSMSG_CANNOT_TRIM "You must include a minimum inactivity duration to trim."
#define CSMSG_NO_SELF_CLVL "You cannot change your own access."
--- 178,182 ----
#define CSMSG_CANNOT_DEL "You lack sufficient access to delete users."
#define CSMSG_CANNOT_CLVL "You lack sufficient access to modify users' access."
! #define CSMSG_CANNOT_TRIM "You must include a minimum inactivity duration of at least 60 seconds to trim."
#define CSMSG_NO_SELF_CLVL "You cannot change your own access."
***************
*** 2594,2598 ****
duration = ParseInterval(argv[2]);
! if(!duration)
{
chanserv_notice(user, CSMSG_CANNOT_TRIM);
--- 2594,2598 ----
duration = ParseInterval(argv[2]);
! if(duration < 60)
{
chanserv_notice(user, CSMSG_CANNOT_TRIM);
***************
*** 5842,5857 ****
* kickban them.
*/
! for(ii=0; ii<channel->banlist.used; ii++)
{
! if(user_matches_glob(user, channel->banlist.list[ii]->ban, 1)) break;
}
if(ii<channel->banlist.used)
{
! if(user->uplink->burst)
! {
! /* Riding a netburst. Naughty. */
! KickChannelUser(user, channel, chanserv, CSMSG_NETRIDE_DETECTED);
! return;
! }
}
else if(channel->banlist.used < MAXBANS)
--- 5842,5865 ----
* kickban them.
*/
! if(user->uplink->burst)
{
! for(ii = 0; ii < channel->banlist.used; ii++)
! {
! if(user_matches_glob(user, channel->banlist.list[ii]->ban, 1))
! {
! break;
! }
! }
}
+ else
+ {
+ ii = channel->banlist.used;
+ }
+
if(ii<channel->banlist.used)
{
! /* Riding a netburst. Naughty. */
! KickChannelUser(user, channel, chanserv, CSMSG_NETRIDE_DETECTED);
! return;
}
else if(channel->banlist.used < MAXBANS)
|