ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/modules/core/m_message.c
(Generate patch)

Comparing ircd-hybrid-7.2/modules/core/m_message.c (file contents):
Revision 885 by michael, Wed Oct 31 18:09:24 2007 UTC vs.
Revision 948 by michael, Tue Jul 21 17:34:06 2009 UTC

# Line 682 | Line 682 | flood_attack_client(int p_or_n, struct C
682          CurrentTime - target_p->localClient->first_received_message_time;
683        target_p->localClient->received_number_of_privmsgs -= delta;
684        target_p->localClient->first_received_message_time = CurrentTime;
685 +
686        if (target_p->localClient->received_number_of_privmsgs <= 0)
687        {
688          target_p->localClient->received_number_of_privmsgs = 0;
689 <        target_p->localClient->flood_noticed = 0;
689 >        ClearMsgFloodNoticed(target_p);
690        }
691      }
692  
693      if ((target_p->localClient->received_number_of_privmsgs >=
694 <         GlobalSetOptions.floodcount) || target_p->localClient->flood_noticed)
694 >         GlobalSetOptions.floodcount) || IsMsgFloodNoticed(target_p))
695      {
696 <      if (target_p->localClient->flood_noticed == 0)
696 >      if (!IsMsgFloodNoticed(target_p))
697        {
698          sendto_realops_flags(UMODE_BOTS, L_ALL,
699                               "Possible Flooder %s on %s target: %s",
700                               get_client_name(source_p, HIDE_IP),
701                               source_p->servptr->name, target_p->name);
702 <        target_p->localClient->flood_noticed = 1;
702 >        SetMsgFloodNoticed(target_p);
703          /* add a bit of penalty */
704          target_p->localClient->received_number_of_privmsgs += 2;
705        }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines