Line | Branch | Exec | Source |
---|---|---|---|
1 | /* | ||
2 | ** EPITECH PROJECT, 2024 | ||
3 | ** zappy | ||
4 | ** File description: | ||
5 | ** send gui | ||
6 | */ | ||
7 | |||
8 | #include "client.h" | ||
9 | #include "server.h" | ||
10 | #include <stdarg.h> | ||
11 | |||
12 | 37 | void message_to_graphicals(server_t *server, char *fmt, ...) | |
13 | { | ||
14 | client_list_t *client; | ||
15 | 37 | va_list args; | |
16 | |||
17 | 37 | if (fmt == NULL) | |
18 | ✗ | return; | |
19 | 127 | TAILQ_FOREACH(client, &server->clients, entries) { | |
20 | 90 | if (client->client && client->client->is_graphic) { | |
21 | 1 | va_start(args, fmt); | |
22 | 1 | vdprintf(client->client->fd, fmt, args); | |
23 | 1 | va_end(args); | |
24 | } | ||
25 | } | ||
26 | } | ||
27 |