Send client name and IP through telnet as well

Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
This commit is contained in:
Mcat12
2018-06-06 18:00:55 -04:00
parent 2ed2115f54
commit d06decad80
+3 -11
View File
@@ -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);
}
}