[srvx-commits] CVS: services/src opserv.c,1.187.2.50,1.187.2.51
Brought to you by:
entrope
From: Entrope <en...@us...> - 2001-08-25 03:16:06
|
Update of /cvsroot/srvx/services/src In directory usw-pr-cvs1:/tmp/cvs-serv22356/src Modified Files: Tag: rel-1_0 opserv.c Log Message: when users join +badword channels, /KILL them instead of trying to take over the channel Index: opserv.c =================================================================== RCS file: /cvsroot/srvx/services/src/opserv.c,v retrieving revision 1.187.2.50 retrieving revision 1.187.2.51 diff -C2 -r1.187.2.50 -r1.187.2.51 *** opserv.c 2001/08/24 03:13:37 1.187.2.50 --- opserv.c 2001/08/25 03:16:03 1.187.2.51 *************** *** 1976,1990 **** newchan->join_policer = policer_new(opserv_conf.join_policer_params, now); if ((newchan->bad_channel = opserv_bad_channel(newchan->name))) { ! AddChannelUser(opserv, newchan, 0); ! AddChannelOp(1, &opserv, newchan, self->numeric, 1); ! newchan->modes |= MODE_SECRET | MODE_INVITEONLY; ! irc_mode(self->numeric, newchan, "+sib *!*@*"); ! for (n=newchan->members.used; n>0; ) { ! struct modeNode *mNode = newchan->members.list[--n]; ! if (IsService(mNode->user)) continue; ! KickChannelUser(mNode->user, newchan, opserv, OSMSG_ILLEGAL_REASON); ! } ! timeq_add(now + opserv_conf.purge_lock_delay, opserv_part_channel, newchan); return; } --- 1976,1999 ---- newchan->join_policer = policer_new(opserv_conf.join_policer_params, now); if ((newchan->bad_channel = opserv_bad_channel(newchan->name))) { ! if (newchan->name[0] == '#') { ! /* We can hack modes and ops and stuff */ ! AddChannelUser(opserv, newchan, 0); ! AddChannelOp(1, &opserv, newchan, self->numeric, 1); ! newchan->modes |= MODE_SECRET | MODE_INVITEONLY; ! irc_mode(self->numeric, newchan, "+sib *!*@*"); ! for (n=newchan->members.used; n>0; ) { ! struct modeNode *mNode = newchan->members.list[--n]; ! if (IsService(mNode->user)) continue; ! KickChannelUser(mNode->user, newchan, opserv, OSMSG_ILLEGAL_REASON); ! } ! timeq_add(now + opserv_conf.purge_lock_delay, opserv_part_channel, newchan); ! } else { ! for (n=newchan->members.used; n>0; ) { ! struct modeNode *mNode = newchan->members.list[--n]; ! if (IsService(mNode->user)) continue; ! DelUser(mNode->user, opserv, true, OSMSG_ILLEGAL_REASON); ! } ! } return; } *************** *** 2012,2017 **** { if (channel->bad_channel && !IsService(user)) { ! opserv_notice(user, OSMSG_ILLEGAL_CHANNEL, channel->name); ! KickChannelUser(user, channel, opserv, OSMSG_ILLEGAL_REASON); } --- 2021,2030 ---- { if (channel->bad_channel && !IsService(user)) { ! if (channel->name[0] == '#') { ! opserv_notice(user, OSMSG_ILLEGAL_CHANNEL, channel->name); ! KickChannelUser(user, channel, opserv, OSMSG_ILLEGAL_REASON); ! } else { ! DelUser(user, opserv, true, OSMSG_ILLEGAL_REASON); ! } } |