Update of /cvsroot/srvx/services/src
In directory usw-pr-cvs1:/tmp/cvs-serv14973/src
Modified Files:
opserv.c
Log Message:
Modify the join flood countermeasure warnings so they only happen once.
Index: opserv.c
===================================================================
RCS file: /cvsroot/srvx/services/src/opserv.c,v
retrieving revision 1.279
retrieving revision 1.280
diff -C2 -r1.279 -r1.280
*** opserv.c 16 Oct 2002 03:37:23 -0000 1.279
--- opserv.c 21 Oct 2002 02:32:52 -0000 1.280
***************
*** 1882,1892 ****
if (!user->uplink->burst && !policer_conforms(channel->join_policer, now, 1.0)) {
! if (!channel->join_flooded) {
! channel->join_flooded = 1;
! if(opserv_conf.join_flood_moderate && (channel->members.used > opserv_conf.join_flood_moderate_threshold)) {
! if(!GetUserMode(channel, opserv)) {
! AddChannelUser(opserv, channel);
! AddChannelOp(1, &opserv, channel, opserv, 1);
! }
channel->modes |= MODE_MODERATED;
irc_mode(opserv, channel, "+m");
--- 1882,1897 ----
if (!user->uplink->burst && !policer_conforms(channel->join_policer, now, 1.0)) {
! /* Don't moderate the channel unless it is activated and
! the number of users in the channel is over the threshold. */
! if(opserv_conf.join_flood_moderate && (channel->members.used > opserv_conf.join_flood_moderate_threshold)) {
! if(!GetUserMode(channel, opserv)) {
! /* If we aren't in the channel, join it. */
! AddChannelUser(opserv, channel);
! AddChannelOp(1, &opserv, channel, opserv, 1);
! }
! if(!(channel->modes | MODE_MODERATED)) {
! /* If the channel isn't moderated, moderate it and
! warn the channel (we also warn IRC operators of
! the fact sporadically). */
channel->modes |= MODE_MODERATED;
irc_mode(opserv, channel, "+m");
***************
*** 1894,1899 ****
send_channel_notice(channel, opserv, OSMSG_FLOOD_MODERATE);
}
! opserv_alert(OSMSG_JOIN_FLOOD, channel->name, channel->members.used, opserv_conf.join_flood_moderate ? "; channel moderated" : "");
! }
log(OS_LOG, LOG_INFO, "Join to %s during flood: "IDENT_FORMAT"\n", channel->name, IDENT_DATA(user));
} else {
--- 1899,1907 ----
send_channel_notice(channel, opserv, OSMSG_FLOOD_MODERATE);
}
! }
! if (!channel->join_flooded) {
! channel->join_flooded = 1;
! opserv_alert(OSMSG_JOIN_FLOOD, channel->name, channel->members.used, channel->modes & MODE_MODERATED ? "; channel moderated" : "");
! }
log(OS_LOG, LOG_INFO, "Join to %s during flood: "IDENT_FORMAT"\n", channel->name, IDENT_DATA(user));
} else {
|