1 |
|
/* |
2 |
< |
* ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). |
3 |
< |
* client.c: Controls clients. |
2 |
> |
* ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd) |
3 |
|
* |
4 |
< |
* Copyright (C) 2002 by the past and present ircd coders, and others. |
4 |
> |
* Copyright (c) 1997-2014 ircd-hybrid development team |
5 |
|
* |
6 |
|
* This program is free software; you can redistribute it and/or modify |
7 |
|
* it under the terms of the GNU General Public License as published by |
17 |
|
* along with this program; if not, write to the Free Software |
18 |
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 |
19 |
|
* USA |
20 |
< |
* |
21 |
< |
* $Id$ |
20 |
> |
*/ |
21 |
> |
|
22 |
> |
/*! \file client.c |
23 |
> |
* \brief Controls clients. |
24 |
> |
* \version $Id$ |
25 |
|
*/ |
26 |
|
|
27 |
|
#include "stdinc.h" |
53 |
|
#include "irc_res.h" |
54 |
|
#include "userhost.h" |
55 |
|
#include "watch.h" |
56 |
+ |
#include "rng_mt.h" |
57 |
+ |
#include "parse.h" |
58 |
|
|
59 |
|
dlink_list listing_client_list = { NULL, NULL, 0 }; |
60 |
|
/* Pointer to beginning of Client list */ |
78 |
|
|
79 |
|
static void check_pings_list(dlink_list *); |
80 |
|
static void check_unknowns_list(void); |
77 |
– |
static void ban_them(struct Client *, struct MaskItem *); |
81 |
|
|
82 |
|
|
83 |
< |
/* init_client() |
83 |
> |
/* client_init() |
84 |
|
* |
85 |
|
* inputs - NONE |
86 |
|
* output - NONE |
87 |
|
* side effects - initialize client free memory |
88 |
|
*/ |
89 |
|
void |
90 |
< |
init_client(void) |
90 |
> |
client_init(void) |
91 |
|
{ |
92 |
|
/* start off the check ping event .. -- adrian |
93 |
|
* Every 30 seconds is plenty -- db |
119 |
|
|
120 |
|
memset(client_p, 0, sizeof(*client_p)); |
121 |
|
|
122 |
< |
if (from == NULL) |
122 |
> |
if (!from) |
123 |
|
{ |
124 |
|
client_p->from = client_p; /* 'from' of local client is self! */ |
125 |
|
client_p->localClient = mp_pool_get(lclient_pool); |
139 |
|
|
140 |
|
client_p->idhnext = client_p; |
141 |
|
client_p->hnext = client_p; |
142 |
< |
client_p->status = STAT_UNKNOWN; |
142 |
> |
SetUnknown(client_p); |
143 |
|
strcpy(client_p->username, "unknown"); |
144 |
|
strcpy(client_p->svid, "0"); |
145 |
|
|
156 |
|
static void |
157 |
|
free_client(struct Client *client_p) |
158 |
|
{ |
159 |
< |
assert(client_p != NULL); |
159 |
> |
assert(client_p); |
160 |
|
assert(client_p != &me); |
161 |
|
assert(client_p->hnext == client_p); |
162 |
|
assert(client_p->idhnext == client_p); |
163 |
|
assert(client_p->channel.head == NULL); |
164 |
|
assert(dlink_list_length(&client_p->channel) == 0); |
165 |
|
assert(dlink_list_length(&client_p->whowas) == 0); |
166 |
< |
assert(!IsServer(client_p) || IsServer(client_p) && client_p->serv); |
166 |
> |
assert(!IsServer(client_p) || (IsServer(client_p) && client_p->serv)); |
167 |
|
|
168 |
|
MyFree(client_p->serv); |
169 |
+ |
MyFree(client_p->certfp); |
170 |
|
|
171 |
|
if (MyConnect(client_p)) |
172 |
|
{ |
173 |
|
assert(client_p->localClient->invited.head == NULL); |
174 |
|
assert(dlink_list_length(&client_p->localClient->invited) == 0); |
175 |
< |
assert(dlink_list_length(&client_p->localClient->watches) == 0); |
175 |
> |
assert(dlink_list_length(&client_p->localClient->watches) == 0); |
176 |
|
assert(IsClosing(client_p) && IsDead(client_p)); |
177 |
|
|
178 |
|
MyFree(client_p->localClient->response); |
185 |
|
{ |
186 |
|
assert(0 < client_p->localClient->listener->ref_count); |
187 |
|
if (0 == --client_p->localClient->listener->ref_count && |
188 |
< |
!client_p->localClient->listener->active) |
188 |
> |
!client_p->localClient->listener->active) |
189 |
|
free_listener(client_p->localClient->listener); |
190 |
|
} |
191 |
|
|
204 |
|
* |
205 |
|
* inputs - NOT USED (from event) |
206 |
|
* output - next time_t when check_pings() should be called again |
207 |
< |
* side effects - |
207 |
> |
* side effects - |
208 |
|
* |
209 |
|
* |
210 |
|
* A PING can be sent to clients as necessary. |
226 |
|
|
227 |
|
static void |
228 |
|
check_pings(void *notused) |
229 |
< |
{ |
229 |
> |
{ |
230 |
|
check_pings_list(&local_client_list); |
231 |
|
check_pings_list(&serv_list); |
232 |
|
check_unknowns_list(); |
236 |
|
* |
237 |
|
* inputs - pointer to list to check |
238 |
|
* output - NONE |
239 |
< |
* side effects - |
239 |
> |
* side effects - |
240 |
|
*/ |
241 |
|
static void |
242 |
|
check_pings_list(dlink_list *list) |
243 |
|
{ |
244 |
< |
char scratch[32]; /* way too generous but... */ |
244 |
> |
char scratch[IRCD_BUFSIZE]; |
245 |
|
int ping = 0; /* ping time value from client */ |
246 |
|
dlink_node *ptr = NULL, *next_ptr = NULL; |
247 |
|
|
256 |
|
if (IsDead(client_p)) |
257 |
|
{ |
258 |
|
/* Ignore it, its been exited already */ |
259 |
< |
continue; |
259 |
> |
continue; |
260 |
|
} |
261 |
|
|
262 |
|
if (!IsRegistered(client_p)) |
268 |
|
{ |
269 |
|
if (!IsPingSent(client_p)) |
270 |
|
{ |
271 |
< |
/* |
272 |
< |
* if we havent PINGed the connection and we havent |
273 |
< |
* heard from it in a while, PING it to make sure |
274 |
< |
* it is still alive. |
275 |
< |
*/ |
276 |
< |
SetPingSent(client_p); |
277 |
< |
client_p->localClient->lasttime = CurrentTime - ping; |
278 |
< |
sendto_one(client_p, "PING :%s", ID_or_name(&me, client_p)); |
271 |
> |
/* |
272 |
> |
* if we havent PINGed the connection and we havent |
273 |
> |
* heard from it in a while, PING it to make sure |
274 |
> |
* it is still alive. |
275 |
> |
*/ |
276 |
> |
SetPingSent(client_p); |
277 |
> |
client_p->localClient->lasttime = CurrentTime - ping; |
278 |
> |
sendto_one(client_p, "PING :%s", ID_or_name(&me, client_p)); |
279 |
|
} |
280 |
|
else |
281 |
|
{ |
286 |
|
* and it has a ping time, then close its connection. |
287 |
|
*/ |
288 |
|
if (IsServer(client_p) || IsHandshake(client_p)) |
289 |
< |
{ |
290 |
< |
sendto_realops_flags(UMODE_ALL, L_ADMIN, SEND_NOTICE, |
291 |
< |
"No response from %s, closing link", |
292 |
< |
get_client_name(client_p, HIDE_IP)); |
293 |
< |
sendto_realops_flags(UMODE_ALL, L_OPER, SEND_NOTICE, |
294 |
< |
"No response from %s, closing link", |
295 |
< |
get_client_name(client_p, MASK_IP)); |
296 |
< |
ilog(LOG_TYPE_IRCD, "No response from %s, closing link", |
297 |
< |
get_client_name(client_p, HIDE_IP)); |
298 |
< |
} |
289 |
> |
{ |
290 |
> |
sendto_realops_flags(UMODE_ALL, L_ADMIN, SEND_NOTICE, |
291 |
> |
"No response from %s, closing link", |
292 |
> |
get_client_name(client_p, HIDE_IP)); |
293 |
> |
sendto_realops_flags(UMODE_ALL, L_OPER, SEND_NOTICE, |
294 |
> |
"No response from %s, closing link", |
295 |
> |
get_client_name(client_p, MASK_IP)); |
296 |
> |
ilog(LOG_TYPE_IRCD, "No response from %s, closing link", |
297 |
> |
get_client_name(client_p, HIDE_IP)); |
298 |
> |
} |
299 |
|
|
300 |
|
snprintf(scratch, sizeof(scratch), "Ping timeout: %d seconds", |
301 |
|
(int)(CurrentTime - client_p->localClient->lasttime)); |
302 |
< |
exit_client(client_p, &me, scratch); |
302 |
> |
exit_client(client_p, scratch); |
303 |
|
} |
304 |
|
} |
305 |
|
} |
315 |
|
static void |
316 |
|
check_unknowns_list(void) |
317 |
|
{ |
318 |
< |
dlink_node *ptr, *next_ptr; |
318 |
> |
dlink_node *ptr = NULL, *ptr_next = NULL; |
319 |
|
|
320 |
< |
DLINK_FOREACH_SAFE(ptr, next_ptr, unknown_list.head) |
320 |
> |
DLINK_FOREACH_SAFE(ptr, ptr_next, unknown_list.head) |
321 |
|
{ |
322 |
|
struct Client *client_p = ptr->data; |
323 |
|
|
326 |
|
* for > 30s, close them. |
327 |
|
*/ |
328 |
|
if (IsAuthFinished(client_p) && (CurrentTime - client_p->localClient->firsttime) > 30) |
329 |
< |
exit_client(client_p, &me, "Registration timed out"); |
329 |
> |
exit_client(client_p, "Registration timed out"); |
330 |
|
} |
331 |
|
} |
332 |
|
|
337 |
|
* side effects - Check all connections for a pending kline against the |
338 |
|
* client, exit the client if a kline matches. |
339 |
|
*/ |
340 |
< |
void |
340 |
> |
void |
341 |
|
check_conf_klines(void) |
342 |
< |
{ |
342 |
> |
{ |
343 |
|
struct Client *client_p = NULL; /* current local client_p being examined */ |
344 |
|
struct MaskItem *conf = NULL; |
345 |
|
dlink_node *ptr, *next_ptr; |
354 |
|
continue; |
355 |
|
|
356 |
|
if ((conf = find_dline_conf(&client_p->localClient->ip, |
357 |
< |
client_p->localClient->aftype)) != NULL) |
357 |
> |
client_p->localClient->aftype))) |
358 |
|
{ |
359 |
|
if (conf->type == CONF_EXEMPT) |
360 |
< |
continue; |
360 |
> |
continue; |
361 |
|
|
362 |
< |
ban_them(client_p, conf); |
362 |
> |
conf_try_ban(client_p, conf); |
363 |
|
continue; /* and go examine next fd/client_p */ |
364 |
|
} |
365 |
|
|
366 |
< |
if (ConfigFileEntry.glines && (conf = find_gline(client_p))) |
366 |
> |
if (ConfigFileEntry.glines) |
367 |
|
{ |
368 |
< |
if (IsExemptKline(client_p) || |
369 |
< |
IsExemptGline(client_p)) |
368 |
> |
if ((conf = find_conf_by_address(client_p->host, &client_p->localClient->ip, |
369 |
> |
CONF_GLINE, client_p->localClient->aftype, |
370 |
> |
client_p->username, NULL, 1))) |
371 |
|
{ |
372 |
< |
sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE, |
373 |
< |
"GLINE over-ruled for %s, client is %sline_exempt", |
369 |
< |
get_client_name(client_p, HIDE_IP), IsExemptKline(client_p) ? "k" : "g"); |
372 |
> |
conf_try_ban(client_p, conf); |
373 |
> |
/* and go examine next fd/client_p */ |
374 |
|
continue; |
375 |
|
} |
376 |
+ |
} |
377 |
|
|
378 |
< |
ban_them(client_p, conf); |
379 |
< |
/* and go examine next fd/client_p */ |
380 |
< |
continue; |
376 |
< |
} |
377 |
< |
|
378 |
< |
if ((conf = find_kill(client_p)) != NULL) |
378 |
> |
if ((conf = find_conf_by_address(client_p->host, &client_p->localClient->ip, |
379 |
> |
CONF_KLINE, client_p->localClient->aftype, |
380 |
> |
client_p->username, NULL, 1))) |
381 |
|
{ |
382 |
< |
if (IsExemptKline(client_p)) |
383 |
< |
{ |
382 |
< |
sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE, |
383 |
< |
"KLINE over-ruled for %s, client is kline_exempt", |
384 |
< |
get_client_name(client_p, HIDE_IP)); |
385 |
< |
continue; |
386 |
< |
} |
387 |
< |
|
388 |
< |
ban_them(client_p, conf); |
389 |
< |
continue; |
382 |
> |
conf_try_ban(client_p, conf); |
383 |
> |
continue; |
384 |
|
} |
385 |
|
|
386 |
|
if ((conf = find_matching_name_conf(CONF_XLINE, client_p->info, |
387 |
< |
NULL, NULL, 0)) != NULL || |
394 |
< |
(conf = find_matching_name_conf(CONF_RXLINE, client_p->info, |
395 |
< |
NULL, NULL, 0)) != NULL) |
387 |
> |
NULL, NULL, 0))) |
388 |
|
{ |
389 |
< |
ban_them(client_p, conf); |
389 |
> |
conf_try_ban(client_p, conf); |
390 |
|
continue; |
391 |
|
} |
392 |
|
} |
402 |
|
if (conf->type == CONF_EXEMPT) |
403 |
|
continue; |
404 |
|
|
405 |
< |
exit_client(client_p, &me, "D-lined"); |
405 |
> |
exit_client(client_p, "D-lined"); |
406 |
|
} |
407 |
|
} |
408 |
|
} |
409 |
|
|
410 |
|
/* |
411 |
< |
* ban_them |
411 |
> |
* conf_try_ban |
412 |
|
* |
413 |
|
* inputs - pointer to client to ban |
414 |
|
* - pointer to MaskItem |
415 |
|
* output - NONE |
416 |
|
* side effects - given client_p is banned |
417 |
|
*/ |
418 |
< |
static void |
419 |
< |
ban_them(struct Client *client_p, struct MaskItem *conf) |
418 |
> |
void |
419 |
> |
conf_try_ban(struct Client *client_p, struct MaskItem *conf) |
420 |
|
{ |
421 |
< |
const char *user_reason = NULL; /* What is sent to user */ |
421 |
> |
const char *user_reason = NULL; /* What is sent to user */ |
422 |
|
const char *type_string = NULL; |
423 |
|
const char dline_string[] = "D-line"; |
424 |
|
const char kline_string[] = "K-line"; |
427 |
|
|
428 |
|
switch (conf->type) |
429 |
|
{ |
438 |
– |
case CONF_RKLINE: |
430 |
|
case CONF_KLINE: |
431 |
+ |
if (IsExemptKline(client_p)) |
432 |
+ |
{ |
433 |
+ |
sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE, |
434 |
+ |
"KLINE over-ruled for %s, client is kline_exempt", |
435 |
+ |
get_client_name(client_p, HIDE_IP)); |
436 |
+ |
return; |
437 |
+ |
} |
438 |
+ |
|
439 |
|
type_string = kline_string; |
440 |
|
break; |
441 |
|
case CONF_DLINE: |
442 |
|
type_string = dline_string; |
443 |
|
break; |
444 |
|
case CONF_GLINE: |
445 |
+ |
if (IsExemptKline(client_p) || |
446 |
+ |
IsExemptGline(client_p)) |
447 |
+ |
{ |
448 |
+ |
sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE, |
449 |
+ |
"GLINE over-ruled for %s, client is %sline_exempt", |
450 |
+ |
get_client_name(client_p, HIDE_IP), IsExemptKline(client_p) ? "k" : "g"); |
451 |
+ |
return; |
452 |
+ |
} |
453 |
+ |
|
454 |
|
type_string = gline_string; |
455 |
|
break; |
448 |
– |
case CONF_RXLINE: |
456 |
|
case CONF_XLINE: |
457 |
|
type_string = xline_string; |
458 |
|
++conf->count; |
468 |
|
type_string, get_client_name(client_p, HIDE_IP)); |
469 |
|
|
470 |
|
if (IsClient(client_p)) |
471 |
< |
sendto_one(client_p, form_str(ERR_YOUREBANNEDCREEP), |
465 |
< |
me.name, client_p->name, user_reason); |
471 |
> |
sendto_one_numeric(client_p, &me, ERR_YOUREBANNEDCREEP, user_reason); |
472 |
|
|
473 |
< |
exit_client(client_p, &me, user_reason); |
473 |
> |
exit_client(client_p, user_reason); |
474 |
|
} |
475 |
|
|
476 |
|
/* update_client_exit_stats() |
477 |
|
* |
478 |
|
* input - pointer to client |
479 |
|
* output - NONE |
480 |
< |
* side effects - |
480 |
> |
* side effects - |
481 |
|
*/ |
482 |
|
static void |
483 |
|
update_client_exit_stats(struct Client *client_p) |
507 |
|
* side effects - find person by (nick)name |
508 |
|
*/ |
509 |
|
struct Client * |
510 |
< |
find_person(const struct Client *client_p, const char *name) |
510 |
> |
find_person(const struct Client *const source_p, const char *name) |
511 |
|
{ |
512 |
< |
struct Client *c2ptr = NULL; |
512 |
> |
struct Client *target_p = NULL; |
513 |
|
|
514 |
|
if (IsDigit(*name)) |
515 |
|
{ |
516 |
< |
if ((c2ptr = hash_find_id(name)) != NULL) |
517 |
< |
{ |
512 |
< |
/* invisible users shall not be found by UID guessing */ |
513 |
< |
if (HasUMode(c2ptr, UMODE_INVISIBLE)) |
514 |
< |
if (!IsServer(client_p) && !HasFlag(client_p, FLAGS_SERVICE)) |
515 |
< |
c2ptr = NULL; |
516 |
< |
} |
516 |
> |
if (IsServer(source_p->from)) |
517 |
> |
target_p = hash_find_id(name); |
518 |
|
} |
519 |
|
else |
520 |
< |
c2ptr = hash_find_client(name); |
520 |
> |
target_p = hash_find_client(name); |
521 |
|
|
522 |
< |
return ((c2ptr != NULL && IsClient(c2ptr)) ? c2ptr : NULL); |
522 |
> |
return (target_p && IsClient(target_p)) ? target_p : NULL; |
523 |
|
} |
524 |
|
|
525 |
|
/* |
526 |
< |
* find_chasing - find the client structure for a nick name (user) |
527 |
< |
* using history mechanism if necessary. If the client is not found, |
528 |
< |
* an error message (NO SUCH NICK) is generated. If the client was found |
528 |
< |
* through the history, chasing will be 1 and otherwise 0. |
526 |
> |
* find_chasing - find the client structure for a nick name (name) |
527 |
> |
* using history mechanism if necessary. If the client is not found, |
528 |
> |
* an error message (NO SUCH NICK) is generated. |
529 |
|
*/ |
530 |
|
struct Client * |
531 |
< |
find_chasing(struct Client *client_p, struct Client *source_p, const char *user, int *chasing) |
531 |
> |
find_chasing(struct Client *source_p, const char *name) |
532 |
|
{ |
533 |
< |
struct Client *who = find_person(client_p, user); |
534 |
< |
|
535 |
< |
if (chasing) |
536 |
< |
*chasing = 0; |
533 |
> |
struct Client *who = find_person(source_p, name); |
534 |
|
|
535 |
|
if (who) |
536 |
|
return who; |
537 |
|
|
538 |
< |
if (IsDigit(*user)) |
538 |
> |
if (IsDigit(*name)) |
539 |
|
return NULL; |
540 |
|
|
541 |
< |
if ((who = get_history(user, |
542 |
< |
(time_t)ConfigFileEntry.kill_chase_time_limit)) |
543 |
< |
== NULL) |
541 |
> |
if ((who = whowas_get_history(name, |
542 |
> |
(time_t)ConfigFileEntry.kill_chase_time_limit)) |
543 |
> |
== NULL) |
544 |
|
{ |
545 |
< |
sendto_one(source_p, form_str(ERR_NOSUCHNICK), |
549 |
< |
me.name, source_p->name, user); |
545 |
> |
sendto_one_numeric(source_p, &me, ERR_NOSUCHNICK, name); |
546 |
|
return NULL; |
547 |
|
} |
548 |
|
|
553 |
– |
if (chasing) |
554 |
– |
*chasing = 1; |
555 |
– |
|
549 |
|
return who; |
550 |
|
} |
551 |
|
|
568 |
|
* to modify what it points!!! |
569 |
|
*/ |
570 |
|
const char * |
571 |
< |
get_client_name(const struct Client *client, enum addr_mask_type type) |
571 |
> |
get_client_name(const struct Client *client_p, enum addr_mask_type type) |
572 |
|
{ |
573 |
|
static char nbuf[HOSTLEN * 2 + USERLEN + 5]; |
574 |
|
|
575 |
< |
assert(client != NULL); |
575 |
> |
assert(client_p); |
576 |
|
|
577 |
< |
if (!MyConnect(client)) |
578 |
< |
return client->name; |
577 |
> |
if (!MyConnect(client_p)) |
578 |
> |
return client_p->name; |
579 |
|
|
580 |
< |
if (IsServer(client) || IsConnecting(client) || IsHandshake(client)) |
580 |
> |
if (IsServer(client_p) || IsConnecting(client_p) || IsHandshake(client_p)) |
581 |
|
{ |
582 |
< |
if (!irccmp(client->name, client->host)) |
583 |
< |
return client->name; |
582 |
> |
if (!irccmp(client_p->name, client_p->host)) |
583 |
> |
return client_p->name; |
584 |
|
else if (ConfigServerHide.hide_server_ips) |
585 |
|
type = MASK_IP; |
586 |
|
} |
587 |
|
|
588 |
|
if (ConfigFileEntry.hide_spoof_ips) |
589 |
< |
if (type == SHOW_IP && IsIPSpoof(client)) |
589 |
> |
if (type == SHOW_IP && IsIPSpoof(client_p)) |
590 |
|
type = MASK_IP; |
591 |
|
|
592 |
|
/* And finally, let's get the host information, ip or name */ |
594 |
|
{ |
595 |
|
case SHOW_IP: |
596 |
|
snprintf(nbuf, sizeof(nbuf), "%s[%s@%s]", |
597 |
< |
client->name, |
598 |
< |
client->username, client->sockhost); |
597 |
> |
client_p->name, |
598 |
> |
client_p->username, client_p->sockhost); |
599 |
|
break; |
600 |
|
case MASK_IP: |
601 |
< |
if (client->localClient->aftype == AF_INET) |
601 |
> |
if (client_p->localClient->aftype == AF_INET) |
602 |
|
snprintf(nbuf, sizeof(nbuf), "%s[%s@255.255.255.255]", |
603 |
< |
client->name, client->username); |
603 |
> |
client_p->name, client_p->username); |
604 |
|
else |
605 |
|
snprintf(nbuf, sizeof(nbuf), "%s[%s@ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff]", |
606 |
< |
client->name, client->username); |
606 |
> |
client_p->name, client_p->username); |
607 |
|
break; |
608 |
|
default: |
609 |
|
snprintf(nbuf, sizeof(nbuf), "%s[%s@%s]", |
610 |
< |
client->name, |
611 |
< |
client->username, client->host); |
610 |
> |
client_p->name, |
611 |
> |
client_p->username, client_p->host); |
612 |
|
} |
613 |
|
|
614 |
|
return nbuf; |
618 |
|
free_exited_clients(void) |
619 |
|
{ |
620 |
|
dlink_node *ptr = NULL, *next = NULL; |
621 |
< |
|
621 |
> |
|
622 |
|
DLINK_FOREACH_SAFE(ptr, next, dead_list.head) |
623 |
|
{ |
624 |
|
free_client(ptr->data); |
636 |
|
static void |
637 |
|
exit_one_client(struct Client *source_p, const char *quitmsg) |
638 |
|
{ |
639 |
< |
dlink_node *lp = NULL, *next_lp = NULL; |
639 |
> |
dlink_node *ptr = NULL, *ptr_next = NULL; |
640 |
|
|
641 |
|
assert(!IsMe(source_p)); |
642 |
|
|
643 |
|
if (IsClient(source_p)) |
644 |
|
{ |
645 |
< |
if (source_p->servptr->serv != NULL) |
653 |
< |
dlinkDelete(&source_p->lnode, &source_p->servptr->serv->client_list); |
645 |
> |
dlinkDelete(&source_p->lnode, &source_p->servptr->serv->client_list); |
646 |
|
|
647 |
|
/* |
648 |
|
* If a person is on a channel, send a QUIT notice |
650 |
|
* that the client can show the "**signoff" message). |
651 |
|
* (Note: The notice is to the local clients *only*) |
652 |
|
*/ |
653 |
< |
sendto_common_channels_local(source_p, 0, ":%s!%s@%s QUIT :%s", |
653 |
> |
sendto_common_channels_local(source_p, 0, 0, ":%s!%s@%s QUIT :%s", |
654 |
|
source_p->name, source_p->username, |
655 |
|
source_p->host, quitmsg); |
656 |
< |
DLINK_FOREACH_SAFE(lp, next_lp, source_p->channel.head) |
657 |
< |
remove_user_from_channel(lp->data); |
656 |
> |
DLINK_FOREACH_SAFE(ptr, ptr_next, source_p->channel.head) |
657 |
> |
remove_user_from_channel(ptr->data); |
658 |
|
|
659 |
< |
add_history(source_p, 0); |
660 |
< |
off_history(source_p); |
659 |
> |
whowas_add_history(source_p, 0); |
660 |
> |
whowas_off_history(source_p); |
661 |
|
|
662 |
|
watch_check_hash(source_p, RPL_LOGOFF); |
663 |
|
|
664 |
|
if (MyConnect(source_p)) |
665 |
|
{ |
666 |
|
/* Clean up invitefield */ |
667 |
< |
DLINK_FOREACH_SAFE(lp, next_lp, source_p->localClient->invited.head) |
668 |
< |
del_invite(lp->data, source_p); |
667 |
> |
DLINK_FOREACH_SAFE(ptr, ptr_next, source_p->localClient->invited.head) |
668 |
> |
del_invite(ptr->data, source_p); |
669 |
|
|
670 |
|
del_all_accepts(source_p); |
671 |
|
} |
674 |
|
{ |
675 |
|
dlinkDelete(&source_p->lnode, &source_p->servptr->serv->server_list); |
676 |
|
|
677 |
< |
if ((lp = dlinkFindDelete(&global_serv_list, source_p)) != NULL) |
678 |
< |
free_dlink_node(lp); |
677 |
> |
if ((ptr = dlinkFindDelete(&global_serv_list, source_p))) |
678 |
> |
free_dlink_node(ptr); |
679 |
|
} |
680 |
|
|
681 |
|
/* Remove source_p from the client lists */ |
682 |
< |
if (HasID(source_p)) |
682 |
> |
if (source_p->id[0]) |
683 |
|
hash_del_id(source_p); |
684 |
|
if (source_p->name[0]) |
685 |
|
hash_del_client(source_p); |
691 |
|
* NOTE: source_p->node.next cannot be NULL if the client is added |
692 |
|
* to global_client_list (there is always &me at its end) |
693 |
|
*/ |
694 |
< |
if (source_p != NULL && source_p->node.next != NULL) |
694 |
> |
if (source_p->node.next) /* XXX: not needed? */ |
695 |
|
dlinkDelete(&source_p->node, &global_client_list); |
696 |
|
|
697 |
|
update_client_exit_stats(source_p); |
704 |
|
dlinkAdd(source_p, make_dlink_node(), &dead_list); |
705 |
|
} |
706 |
|
|
707 |
< |
/* Recursively send QUITs and SQUITs for source_p and all its dependent clients |
716 |
< |
* and servers to those servers that need them. A server needs the client |
717 |
< |
* QUITs if it can't figure them out from the SQUIT (ie pre-TS4) or if it |
718 |
< |
* isn't getting the SQUIT because of @#(*&@)# hostmasking. With TS4, once |
719 |
< |
* a link gets a SQUIT, it doesn't need any QUIT/SQUITs for clients depending |
720 |
< |
* on that one -orabidoo |
721 |
< |
* |
722 |
< |
* This is now called on each local server -adx |
723 |
< |
*/ |
724 |
< |
static void |
725 |
< |
recurse_send_quits(struct Client *original_source_p, struct Client *source_p, |
726 |
< |
struct Client *from, struct Client *to, const char *comment, |
727 |
< |
const char *splitstr) |
728 |
< |
{ |
729 |
< |
dlink_node *ptr, *next; |
730 |
< |
struct Client *target_p; |
731 |
< |
|
732 |
< |
assert(to != source_p); /* should be already removed from serv_list */ |
733 |
< |
|
734 |
< |
/* If this server can handle quit storm (QS) removal |
735 |
< |
* of dependents, just send the SQUIT |
736 |
< |
*/ |
737 |
< |
if (!IsCapable(to, CAP_QS)) |
738 |
< |
DLINK_FOREACH_SAFE(ptr, next, source_p->serv->client_list.head) |
739 |
< |
{ |
740 |
< |
target_p = ptr->data; |
741 |
< |
sendto_one(to, ":%s QUIT :%s", target_p->name, splitstr); |
742 |
< |
} |
743 |
< |
|
744 |
< |
DLINK_FOREACH_SAFE(ptr, next, source_p->serv->server_list.head) |
745 |
< |
recurse_send_quits(original_source_p, ptr->data, from, to, |
746 |
< |
comment, splitstr); |
747 |
< |
|
748 |
< |
if ((source_p == original_source_p && to != from) || |
749 |
< |
!IsCapable(to, CAP_QS)) |
750 |
< |
{ |
751 |
< |
/* don't use a prefix here - we have to be 100% sure the message |
752 |
< |
* will be accepted without Unknown prefix etc.. */ |
753 |
< |
sendto_one(to, "SQUIT %s :%s", ID_or_name(source_p, to), comment); |
754 |
< |
} |
755 |
< |
} |
756 |
< |
|
757 |
< |
/* |
707 |
> |
/* |
708 |
|
* Remove all clients that depend on source_p; assumes all (S)QUITs have |
709 |
< |
* already been sent. we make sure to exit a server's dependent clients |
710 |
< |
* and servers before the server itself; exit_one_client takes care of |
709 |
> |
* already been sent. we make sure to exit a server's dependent clients |
710 |
> |
* and servers before the server itself; exit_one_client takes care of |
711 |
|
* actually removing things off llists. tweaked from +CSr31 -orabidoo |
712 |
|
*/ |
713 |
|
static void |
714 |
|
recurse_remove_clients(struct Client *source_p, const char *quitmsg) |
715 |
|
{ |
716 |
< |
dlink_node *ptr, *next; |
716 |
> |
dlink_node *ptr = NULL, *ptr_next = NULL; |
717 |
|
|
718 |
< |
DLINK_FOREACH_SAFE(ptr, next, source_p->serv->client_list.head) |
718 |
> |
DLINK_FOREACH_SAFE(ptr, ptr_next, source_p->serv->client_list.head) |
719 |
|
exit_one_client(ptr->data, quitmsg); |
720 |
|
|
721 |
< |
DLINK_FOREACH_SAFE(ptr, next, source_p->serv->server_list.head) |
721 |
> |
DLINK_FOREACH_SAFE(ptr, ptr_next, source_p->serv->server_list.head) |
722 |
|
{ |
723 |
|
recurse_remove_clients(ptr->data, quitmsg); |
724 |
|
exit_one_client(ptr->data, quitmsg); |
726 |
|
} |
727 |
|
|
728 |
|
/* |
779 |
– |
** Remove *everything* that depends on source_p, from all lists, and sending |
780 |
– |
** all necessary QUITs and SQUITs. source_p itself is still on the lists, |
781 |
– |
** and its SQUITs have been sent except for the upstream one -orabidoo |
782 |
– |
*/ |
783 |
– |
static void |
784 |
– |
remove_dependents(struct Client *source_p, struct Client *from, |
785 |
– |
const char *comment, const char *splitstr) |
786 |
– |
{ |
787 |
– |
dlink_node *ptr = NULL; |
788 |
– |
|
789 |
– |
DLINK_FOREACH(ptr, serv_list.head) |
790 |
– |
recurse_send_quits(source_p, source_p, from, ptr->data, |
791 |
– |
comment, splitstr); |
792 |
– |
|
793 |
– |
recurse_remove_clients(source_p, splitstr); |
794 |
– |
} |
795 |
– |
|
796 |
– |
/* |
729 |
|
* exit_client - exit a client of any type. Generally, you can use |
730 |
|
* this on any struct Client, regardless of its state. |
731 |
|
* |
732 |
|
* Note, you shouldn't exit remote _users_ without first doing |
733 |
|
* AddFlag(x, FLAGS_KILLED) and propagating a kill or similar message. |
734 |
+ |
* |
735 |
|
* However, it is perfectly correct to call exit_client to force a _server_ |
736 |
|
* quit (either local or remote one). |
737 |
|
* |
738 |
+ |
* |
739 |
|
* inputs: - a client pointer that is going to be exited |
806 |
– |
* - for servers, the second argument is a pointer to who |
807 |
– |
* is firing the server. This side won't get any generated |
808 |
– |
* messages. NEVER NULL! |
740 |
|
* output: none |
741 |
|
* side effects: the client is delinked from all lists, disconnected, |
742 |
|
* and the rest of IRC network is notified of the exit. |
743 |
|
* Client memory is scheduled to be freed |
744 |
|
*/ |
745 |
|
void |
746 |
< |
exit_client(struct Client *source_p, struct Client *from, const char *comment) |
746 |
> |
exit_client(struct Client *source_p, const char *comment) |
747 |
|
{ |
748 |
|
dlink_node *m = NULL; |
749 |
|
|
760 |
|
if (IsIpHash(source_p)) |
761 |
|
remove_one_ip(&source_p->localClient->ip); |
762 |
|
|
763 |
< |
if (source_p->localClient->auth) |
833 |
< |
{ |
834 |
< |
delete_auth(source_p->localClient->auth); |
835 |
< |
source_p->localClient->auth = NULL; |
836 |
< |
} |
763 |
> |
delete_auth(&source_p->localClient->auth); |
764 |
|
|
765 |
|
/* |
766 |
|
* This source_p could have status of one of STAT_UNKNOWN, STAT_CONNECTING |
782 |
|
Count.local--; |
783 |
|
|
784 |
|
if (HasUMode(source_p, UMODE_OPER)) |
785 |
< |
if ((m = dlinkFindDelete(&oper_list, source_p)) != NULL) |
785 |
> |
if ((m = dlinkFindDelete(&oper_list, source_p))) |
786 |
|
free_dlink_node(m); |
787 |
|
|
788 |
|
assert(dlinkFind(&local_client_list, source_p)); |
789 |
|
dlinkDelete(&source_p->localClient->lclient_node, &local_client_list); |
790 |
|
|
791 |
< |
if (source_p->localClient->list_task != NULL) |
791 |
> |
if (source_p->localClient->list_task) |
792 |
|
free_list_task(source_p->localClient->list_task, source_p); |
793 |
|
|
794 |
|
watch_del_watch_list(source_p); |
797 |
|
source_p->name, source_p->username, source_p->host, comment, |
798 |
|
ConfigFileEntry.hide_spoof_ips && IsIPSpoof(source_p) ? |
799 |
|
"255.255.255.255" : source_p->sockhost); |
873 |
– |
sendto_realops_flags(UMODE_CCONN_FULL, L_ALL, SEND_NOTICE, |
874 |
– |
"CLIEXIT: %s %s %s %s 0 %s", |
875 |
– |
source_p->name, |
876 |
– |
source_p->username, |
877 |
– |
source_p->host, |
878 |
– |
ConfigFileEntry.hide_spoof_ips && IsIPSpoof(source_p) ? |
879 |
– |
"255.255.255.255" : source_p->sockhost, |
880 |
– |
comment); |
800 |
|
ilog(LOG_TYPE_USER, "%s (%3u:%02u:%02u): %s!%s@%s %llu/%llu", |
801 |
|
myctime(source_p->localClient->firsttime), (unsigned int)(on_for / 3600), |
802 |
|
(unsigned int)((on_for % 3600)/60), (unsigned int)(on_for % 60), |
811 |
|
|
812 |
|
assert(dlinkFind(&serv_list, source_p)); |
813 |
|
dlinkDelete(&source_p->localClient->lclient_node, &serv_list); |
895 |
– |
unset_chcap_usage_counts(source_p); |
814 |
|
} |
815 |
|
|
816 |
|
if (!IsDead(source_p)) |
817 |
|
{ |
818 |
|
if (IsServer(source_p)) |
819 |
|
{ |
820 |
< |
/* for them, we are exiting the network */ |
821 |
< |
sendto_one(source_p, ":%s SQUIT %s :%s", |
822 |
< |
ID_or_name(from, source_p), me.name, comment); |
820 |
> |
if (!HasFlag(source_p, FLAGS_SQUIT)) |
821 |
> |
{ |
822 |
> |
/* for them, we are exiting the network */ |
823 |
> |
sendto_one(source_p, ":%s SQUIT %s :%s", |
824 |
> |
me.id, me.id, comment); |
825 |
> |
} |
826 |
|
} |
827 |
|
|
828 |
|
sendto_one(source_p, "ERROR :Closing Link: %s (%s)", |
842 |
|
*/ |
843 |
|
close_connection(source_p); |
844 |
|
} |
845 |
+ |
else if (IsClient(source_p) && HasFlag(source_p->servptr, FLAGS_EOB)) |
846 |
+ |
sendto_realops_flags(UMODE_FARCONNECT, L_ALL, SEND_NOTICE, |
847 |
+ |
"Client exiting at %s: %s (%s@%s) [%s]", |
848 |
+ |
source_p->servptr->name, source_p->name, |
849 |
+ |
source_p->username, source_p->host, comment); |
850 |
|
|
851 |
|
if (IsServer(source_p)) |
852 |
|
{ |
853 |
< |
char splitstr[HOSTLEN + HOSTLEN + 2]; |
853 |
> |
char splitstr[HOSTLEN + HOSTLEN + 2] = ""; |
854 |
|
|
855 |
|
/* This shouldn't ever happen */ |
856 |
< |
assert(source_p->serv != NULL && source_p->servptr != NULL); |
856 |
> |
assert(source_p->serv && source_p->servptr); |
857 |
|
|
858 |
|
if (ConfigServerHide.hide_servers) |
859 |
|
/* |
860 |
< |
* Set netsplit message to "*.net *.split" to still show |
860 |
> |
* Set netsplit message to "*.net *.split" to still show |
861 |
|
* that its a split, but hide the servers splitting |
862 |
|
*/ |
863 |
< |
strcpy(splitstr, "*.net *.split"); |
863 |
> |
strlcpy(splitstr, "*.net *.split", sizeof(splitstr)); |
864 |
|
else |
865 |
|
snprintf(splitstr, sizeof(splitstr), "%s %s", |
866 |
|
source_p->servptr->name, source_p->name); |
867 |
|
|
868 |
< |
remove_dependents(source_p, from->from, comment, splitstr); |
868 |
> |
/* Send SQUIT for source_p in every direction. source_p is already off of serv_list here */ |
869 |
> |
if (!HasFlag(source_p, FLAGS_SQUIT)) |
870 |
> |
sendto_server(NULL, NOCAPS, NOCAPS, "SQUIT %s :%s", source_p->id, comment); |
871 |
> |
|
872 |
> |
/* Now exit the clients internally */ |
873 |
> |
recurse_remove_clients(source_p, splitstr); |
874 |
|
|
875 |
< |
if (source_p->servptr == &me) |
875 |
> |
if (MyConnect(source_p)) |
876 |
|
{ |
877 |
|
sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE, |
878 |
|
"%s was connected for %d seconds. %llu/%llu sendK/recvK.", |
880 |
|
source_p->localClient->send.bytes >> 10, |
881 |
|
source_p->localClient->recv.bytes >> 10); |
882 |
|
ilog(LOG_TYPE_IRCD, "%s was connected for %d seconds. %llu/%llu sendK/recvK.", |
883 |
< |
source_p->name, (int)(CurrentTime - source_p->localClient->firsttime), |
883 |
> |
source_p->name, (int)(CurrentTime - source_p->localClient->firsttime), |
884 |
|
source_p->localClient->send.bytes >> 10, |
885 |
|
source_p->localClient->recv.bytes >> 10); |
886 |
|
} |
887 |
|
} |
888 |
|
else if (IsClient(source_p) && !HasFlag(source_p, FLAGS_KILLED)) |
889 |
< |
{ |
890 |
< |
sendto_server(from->from, CAP_TS6, NOCAPS, |
960 |
< |
":%s QUIT :%s", ID(source_p), comment); |
961 |
< |
sendto_server(from->from, NOCAPS, CAP_TS6, |
962 |
< |
":%s QUIT :%s", source_p->name, comment); |
963 |
< |
} |
889 |
> |
sendto_server(source_p->from, NOCAPS, NOCAPS, ":%s QUIT :%s", |
890 |
> |
source_p->id, comment); |
891 |
|
|
892 |
|
/* The client *better* be off all of the lists */ |
893 |
|
assert(dlinkFind(&unknown_list, source_p) == NULL); |
931 |
|
void |
932 |
|
dead_link_on_read(struct Client *client_p, int error) |
933 |
|
{ |
934 |
< |
char errmsg[255]; |
934 |
> |
char errmsg[IRCD_BUFSIZE]; |
935 |
|
int current_error; |
936 |
|
|
937 |
|
if (IsDefunct(client_p)) |
945 |
|
if (IsServer(client_p) || IsHandshake(client_p)) |
946 |
|
{ |
947 |
|
int connected = CurrentTime - client_p->localClient->firsttime; |
948 |
< |
|
948 |
> |
|
949 |
|
if (error == 0) |
950 |
|
{ |
951 |
|
/* Admins get the real IP */ |
952 |
|
sendto_realops_flags(UMODE_ALL, L_ADMIN, SEND_NOTICE, |
953 |
< |
"Server %s closed the connection", |
954 |
< |
get_client_name(client_p, SHOW_IP)); |
953 |
> |
"Server %s closed the connection", |
954 |
> |
get_client_name(client_p, SHOW_IP)); |
955 |
|
|
956 |
|
/* Opers get a masked IP */ |
957 |
|
sendto_realops_flags(UMODE_ALL, L_OPER, SEND_NOTICE, |
958 |
< |
"Server %s closed the connection", |
959 |
< |
get_client_name(client_p, MASK_IP)); |
958 |
> |
"Server %s closed the connection", |
959 |
> |
get_client_name(client_p, MASK_IP)); |
960 |
|
|
961 |
|
ilog(LOG_TYPE_IRCD, "Server %s closed the connection", |
962 |
< |
get_client_name(client_p, SHOW_IP)); |
962 |
> |
get_client_name(client_p, SHOW_IP)); |
963 |
|
} |
964 |
|
else |
965 |
|
{ |
966 |
|
report_error(L_ADMIN, "Lost connection to %s: %s", |
967 |
< |
get_client_name(client_p, SHOW_IP), current_error); |
967 |
> |
get_client_name(client_p, SHOW_IP), current_error); |
968 |
|
report_error(L_OPER, "Lost connection to %s: %s", |
969 |
< |
get_client_name(client_p, MASK_IP), current_error); |
969 |
> |
get_client_name(client_p, MASK_IP), current_error); |
970 |
|
} |
971 |
|
|
972 |
|
sendto_realops_flags(UMODE_ALL, L_ALL, SEND_NOTICE, |
973 |
< |
"%s had been connected for %d day%s, %2d:%02d:%02d", |
974 |
< |
client_p->name, connected/86400, |
975 |
< |
(connected/86400 == 1) ? "" : "s", |
976 |
< |
(connected % 86400) / 3600, (connected % 3600) / 60, |
977 |
< |
connected % 60); |
973 |
> |
"%s had been connected for %d day%s, %2d:%02d:%02d", |
974 |
> |
client_p->name, connected/86400, |
975 |
> |
(connected/86400 == 1) ? "" : "s", |
976 |
> |
(connected % 86400) / 3600, (connected % 3600) / 60, |
977 |
> |
connected % 60); |
978 |
|
} |
979 |
|
|
980 |
|
if (error == 0) |
984 |
|
snprintf(errmsg, sizeof(errmsg), "Read error: %s", |
985 |
|
strerror(current_error)); |
986 |
|
|
987 |
< |
exit_client(client_p, &me, errmsg); |
987 |
> |
exit_client(client_p, errmsg); |
988 |
|
} |
989 |
|
|
990 |
|
void |
1015 |
|
else |
1016 |
|
notice = "Write error: connection closed"; |
1017 |
|
|
1018 |
< |
exit_client(target_p, &me, notice); |
1018 |
> |
exit_client(target_p, notice); |
1019 |
|
free_dlink_node(ptr); |
1020 |
|
} |
1021 |
|
} |
1043 |
|
|
1044 |
|
struct split_nuh_item * |
1045 |
|
find_accept(const char *nick, const char *user, |
1046 |
< |
const char *host, struct Client *client_p, int do_match) |
1046 |
> |
const char *host, struct Client *client_p, |
1047 |
> |
int (*cmpfunc)(const char *, const char *)) |
1048 |
|
{ |
1049 |
|
dlink_node *ptr = NULL; |
1122 |
– |
/* XXX We wouldn't need that if match() would return 0 on match */ |
1123 |
– |
int (*cmpfunc)(const char *, const char *) = do_match ? match : irccmp; |
1050 |
|
|
1051 |
|
DLINK_FOREACH(ptr, client_p->localClient->acceptlist.head) |
1052 |
|
{ |
1075 |
|
dlink_node *ptr = NULL; |
1076 |
|
|
1077 |
|
if (source == target || find_accept(source->name, source->username, |
1078 |
< |
source->host, target, 1)) |
1078 |
> |
source->host, target, match)) |
1079 |
|
return 1; |
1080 |
|
|
1081 |
|
if (HasUMode(target, UMODE_SOFTCALLERID)) |
1095 |
|
void |
1096 |
|
del_all_accepts(struct Client *client_p) |
1097 |
|
{ |
1098 |
< |
dlink_node *ptr = NULL, *next_ptr = NULL; |
1098 |
> |
dlink_node *ptr = NULL, *ptr_next = NULL; |
1099 |
|
|
1100 |
< |
DLINK_FOREACH_SAFE(ptr, next_ptr, client_p->localClient->acceptlist.head) |
1100 |
> |
DLINK_FOREACH_SAFE(ptr, ptr_next, client_p->localClient->acceptlist.head) |
1101 |
|
del_accept(ptr->data, client_p); |
1102 |
|
} |
1103 |
+ |
|
1104 |
+ |
unsigned int |
1105 |
+ |
idle_time_get(const struct Client *source_p, const struct Client *target_p) |
1106 |
+ |
{ |
1107 |
+ |
unsigned int idle = 0; |
1108 |
+ |
unsigned int min_idle = 0; |
1109 |
+ |
unsigned int max_idle = 0; |
1110 |
+ |
const struct ClassItem *class = get_class_ptr(&target_p->localClient->confs); |
1111 |
+ |
|
1112 |
+ |
if (!(class->flags & CLASS_FLAGS_FAKE_IDLE) || target_p == source_p) |
1113 |
+ |
return CurrentTime - target_p->localClient->last_privmsg; |
1114 |
+ |
if (HasUMode(source_p, UMODE_OPER) && |
1115 |
+ |
!(class->flags & CLASS_FLAGS_HIDE_IDLE_FROM_OPERS)) |
1116 |
+ |
return CurrentTime - target_p->localClient->last_privmsg; |
1117 |
+ |
|
1118 |
+ |
min_idle = class->min_idle; |
1119 |
+ |
max_idle = class->max_idle; |
1120 |
+ |
|
1121 |
+ |
if (min_idle == max_idle) |
1122 |
+ |
return min_idle; |
1123 |
+ |
|
1124 |
+ |
if (class->flags & CLASS_FLAGS_RANDOM_IDLE) |
1125 |
+ |
idle = genrand_int32(); |
1126 |
+ |
else |
1127 |
+ |
idle = CurrentTime - target_p->localClient->last_privmsg; |
1128 |
+ |
|
1129 |
+ |
if (!max_idle) |
1130 |
+ |
idle = 0; |
1131 |
+ |
else |
1132 |
+ |
idle %= max_idle; |
1133 |
+ |
|
1134 |
+ |
if (idle < min_idle) |
1135 |
+ |
idle = min_idle + (idle % (max_idle - min_idle)); |
1136 |
+ |
|
1137 |
+ |
return idle; |
1138 |
+ |
} |