[srvx-commits] CVS: services/src chanserv.c,1.289,1.290
Brought to you by:
entrope
|
From: Adrian D. <sai...@us...> - 2002-10-15 00:46:41
|
Update of /cvsroot/srvx/services/src
In directory usw-pr-cvs1:/tmp/cvs-serv6906
Modified Files:
chanserv.c
Log Message:
Don't make chanserv auto(op|voice) users not on the userlist if the channel is join flooded
Index: chanserv.c
===================================================================
RCS file: /cvsroot/srvx/services/src/chanserv.c,v
retrieving revision 1.289
retrieving revision 1.290
diff -C2 -r1.289 -r1.290
*** chanserv.c 11 Oct 2002 03:05:53 -0000 1.289
--- chanserv.c 15 Oct 2002 00:46:38 -0000 1.290
***************
*** 609,613 ****
{
struct userData *uData;
! if(value == 'a') return 1;
uData = _GetChannelUser(channel->channel_info, user->handle_info, use_override, 0);
if(!uData) return 0;
--- 609,613 ----
{
struct userData *uData;
! if(value == 'a' && !channel->join_flooded) return 1;
uData = _GetChannelUser(channel->channel_info, user->handle_info, use_override, 0);
if(!uData) return 0;
***************
*** 5830,5834 ****
if(channel->members.used > cData->max)
{
! cData->max = channel->members.used;
}
--- 5830,5834 ----
if(channel->members.used > cData->max)
{
! cData->max = channel->members.used;
}
***************
*** 5858,5864 ****
{
/* Not joining through a ban. */
! for(bData = cData->bans;
! bData && !user_matches_glob(user, bData->mask, 1);
! bData = bData->next);
if(bData)
--- 5858,5864 ----
{
/* Not joining through a ban. */
! for(bData = cData->bans;
! bData && !user_matches_glob(user, bData->mask, 1);
! bData = bData->next);
if(bData)
***************
*** 5868,5872 ****
sprintf(kick_reason, CSMSG_KICK_FORMAT, bData->reason, bData->owner);
! bData->triggered = now;
if(bData != cData->bans)
{
--- 5868,5872 ----
sprintf(kick_reason, CSMSG_KICK_FORMAT, bData->reason, bData->owner);
! bData->triggered = now;
if(bData != cData->bans)
{
***************
*** 5879,5883 ****
if(cData->bans)
! {
cData->bans->prev = bData;
}
--- 5879,5883 ----
if(cData->bans)
! {
cData->bans->prev = bData;
}
***************
*** 5892,5928 ****
}
- /* Everything below here depends on the user being authed. */
- if(!user->handle_info) return;
-
- if((channel == chanserv_conf.support_channel) && IsHelper(user))
- {
- HANDLE_SET_FLAG(user->handle_info, HELPING);
- }
-
/* ChanServ will not modify the limits in join-flooded channels. */
if(cData->flags & CHANNEL_DYNAMIC_LIMIT && !channel->join_flooded)
{
! if((channel->limit - channel->members.used) < chanserv_conf.adjust_threshold)
! {
! /* The user count has begun "bumping" into the channel
! limit, so set a timer to raise the limit a bit. Any
! previous timers are removed so three incoming users
! within the delay results in one limit change, not
! three. */
! timeq_del(0, chanserv_adjust_limit, cData, TIMEQ_IGNORE_WHEN);
! timeq_add(now + chanserv_conf.adjust_delay, chanserv_adjust_limit, cData);
! }
}
if(validate_auto_op(user, channel))
{
! AddChannelOp(1, &user, channel, chanserv, 1);
}
! else if(cData->flags & CHANNEL_VOICE_ALL)
{
AddChannelVoice(1, &user, channel, chanserv, 1);
}
handle = user->handle_info;
uData = handle ? GetTrueChannelAccess(cData, handle) : NULL;
--- 5892,5928 ----
}
/* ChanServ will not modify the limits in join-flooded channels. */
if(cData->flags & CHANNEL_DYNAMIC_LIMIT && !channel->join_flooded)
{
! if((channel->limit - channel->members.used) < chanserv_conf.adjust_threshold)
! {
! /* The user count has begun "bumping" into the channel
! limit, so set a timer to raise the limit a bit. Any
! previous timers are removed so three incoming users
! within the delay results in one limit change, not
! three. */
! timeq_del(0, chanserv_adjust_limit, cData, TIMEQ_IGNORE_WHEN);
! timeq_add(now + chanserv_conf.adjust_delay, chanserv_adjust_limit, cData);
! }
}
if(validate_auto_op(user, channel))
{
! AddChannelOp(1, &user, channel, chanserv, 1);
}
! else if(cData->flags & CHANNEL_VOICE_ALL && !channel->join_flooded)
{
AddChannelVoice(1, &user, channel, chanserv, 1);
}
+ /* Everything below here depends on the user being authed. */
+ if(!user->handle_info) return;
+
+ if((channel == chanserv_conf.support_channel) && IsHelper(user))
+ {
+ HANDLE_SET_FLAG(user->handle_info, HELPING);
+ }
+
handle = user->handle_info;
uData = handle ? GetTrueChannelAccess(cData, handle) : NULL;
***************
*** 5967,5972 ****
if(uData)
{
! uData->seen = now;
! uData->present = 1;
}
}
--- 5967,5972 ----
if(uData)
{
! uData->seen = now;
! uData->present = 1;
}
}
|