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)) |
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) |
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; |
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) |
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 |
|
|
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; |