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

Comparing ircd-hybrid/branches/8.2.x/modules/core/m_message.c (file contents):
Revision 4564 by michael, Sun Aug 24 10:24:47 2014 UTC vs.
Revision 4589 by michael, Tue Aug 26 15:59:21 2014 UTC

# Line 120 | Line 120 | flood_attack_client(int p_or_n, struct C
120    if (GlobalSetOptions.floodcount && MyConnect(target_p) &&
121        IsClient(source_p) && !IsCanFlood(source_p))
122    {
123 <    if ((target_p->localClient->first_received_message_time + 1)
123 >    if ((target_p->connection->first_received_message_time + 1)
124          < CurrentTime)
125      {
126        delta =
127 <        CurrentTime - target_p->localClient->first_received_message_time;
128 <      target_p->localClient->received_number_of_privmsgs -= delta;
129 <      target_p->localClient->first_received_message_time = CurrentTime;
127 >        CurrentTime - target_p->connection->first_received_message_time;
128 >      target_p->connection->received_number_of_privmsgs -= delta;
129 >      target_p->connection->first_received_message_time = CurrentTime;
130  
131 <      if (target_p->localClient->received_number_of_privmsgs <= 0)
131 >      if (target_p->connection->received_number_of_privmsgs <= 0)
132        {
133 <        target_p->localClient->received_number_of_privmsgs = 0;
133 >        target_p->connection->received_number_of_privmsgs = 0;
134          DelFlag(target_p, FLAGS_FLOOD_NOTICED);
135        }
136      }
137  
138 <    if ((target_p->localClient->received_number_of_privmsgs >=
138 >    if ((target_p->connection->received_number_of_privmsgs >=
139           GlobalSetOptions.floodcount) || HasFlag(target_p, FLAGS_FLOOD_NOTICED))
140      {
141        if (!HasFlag(target_p, FLAGS_FLOOD_NOTICED))
# Line 146 | Line 146 | flood_attack_client(int p_or_n, struct C
146                               source_p->servptr->name, target_p->name);
147  
148          AddFlag(target_p, FLAGS_FLOOD_NOTICED);
149 <        target_p->localClient->received_number_of_privmsgs += 2;  /* Add a bit of penalty */
149 >        target_p->connection->received_number_of_privmsgs += 2;  /* Add a bit of penalty */
150        }
151  
152        if (MyClient(source_p) && p_or_n != NOTICE)
# Line 155 | Line 155 | flood_attack_client(int p_or_n, struct C
155        return 1;
156      }
157      else
158 <      target_p->localClient->received_number_of_privmsgs++;
158 >      target_p->connection->received_number_of_privmsgs++;
159    }
160  
161    return 0;
# Line 372 | Line 372 | msg_client(int p_or_n, const char *comma
372                               callerid ? "server side ignore" :
373                                          "server side ignore with the exception of common channels");
374  
375 <        if ((target_p->localClient->last_caller_id_time +
375 >        if ((target_p->connection->last_caller_id_time +
376               ConfigGeneral.caller_id_wait) < CurrentTime)
377          {
378            if (p_or_n != NOTICE)
# Line 382 | Line 382 | msg_client(int p_or_n, const char *comma
382                               get_client_name(source_p, HIDE_IP),
383                               callerid ? "+g" : "+G");
384  
385 <          target_p->localClient->last_caller_id_time = CurrentTime;
385 >          target_p->connection->last_caller_id_time = CurrentTime;
386  
387          }
388  
# Line 733 | Line 733 | m_privmsg(struct Client *source_p, int p
733      return 0;
734  
735    if (MyConnect(source_p))
736 <    source_p->localClient->last_privmsg = CurrentTime;
736 >    source_p->connection->last_privmsg = CurrentTime;
737  
738    m_message(PRIVMSG, "PRIVMSG", source_p, parc, parv);
739    return 0;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines