mirror of
https://github.com/pi-hole/FTL.git
synced 2024-10-26 16:52:18 +02:00
Send client name and IP through telnet as well
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
This commit is contained in:
@@ -1012,20 +1012,12 @@ void getClientNames(int *sock)
|
||||
if(skipclient[i])
|
||||
continue;
|
||||
|
||||
char *client;
|
||||
if(clients[i].name != NULL && strlen(clients[i].name) > 0)
|
||||
client = clients[i].name;
|
||||
else
|
||||
client = clients[i].ip;
|
||||
char *client_name = clients[i].name != NULL ? clients[i].name : "";
|
||||
|
||||
if(istelnet[*sock])
|
||||
ssend(*sock, "%s\n", client);
|
||||
ssend(*sock, "%s %s\n", client_name, clients[i].ip);
|
||||
else {
|
||||
if(clients[i].name != NULL)
|
||||
pack_str32(*sock, clients[i].name);
|
||||
else
|
||||
pack_str32(*sock, "");
|
||||
|
||||
pack_str32(*sock, client_name);
|
||||
pack_str32(*sock, clients[i].ip);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user