Ensure AWAY pacing only affects local clients.
This commit is contained in:
parent
63a0ed0604
commit
dc0fd46236
1 changed files with 15 additions and 13 deletions
|
@ -94,6 +94,8 @@ m_away(struct Client *client_p, struct Client *source_p, int parc, const char *p
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Rate limit this because it is sent to common channels. */
|
/* Rate limit this because it is sent to common channels. */
|
||||||
|
if (MyClient(source_p))
|
||||||
|
{
|
||||||
if(!IsOper(source_p) &&
|
if(!IsOper(source_p) &&
|
||||||
source_p->localClient->next_away > rb_current_time())
|
source_p->localClient->next_away > rb_current_time())
|
||||||
{
|
{
|
||||||
|
@ -107,6 +109,7 @@ m_away(struct Client *client_p, struct Client *source_p, int parc, const char *p
|
||||||
else
|
else
|
||||||
source_p->localClient->next_away = rb_current_time() +
|
source_p->localClient->next_away = rb_current_time() +
|
||||||
ConfigFileEntry.away_interval;
|
ConfigFileEntry.away_interval;
|
||||||
|
}
|
||||||
|
|
||||||
if(source_p->user->away == NULL)
|
if(source_p->user->away == NULL)
|
||||||
allocate_away(source_p);
|
allocate_away(source_p);
|
||||||
|
@ -127,6 +130,5 @@ m_away(struct Client *client_p, struct Client *source_p, int parc, const char *p
|
||||||
if(MyConnect(source_p))
|
if(MyConnect(source_p))
|
||||||
sendto_one_numeric(source_p, RPL_NOWAWAY, form_str(RPL_NOWAWAY));
|
sendto_one_numeric(source_p, RPL_NOWAWAY, form_str(RPL_NOWAWAY));
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue