mirror of
https://github.com/besterprotocol/besterd
synced 2023-12-13 21:00:32 +01:00
Retieve matched users for 'SEND_CLIENTS' command
This commit is contained in:
parent
1ca8f6e777
commit
b56e989460
2 changed files with 10 additions and 4 deletions
|
@ -131,9 +131,15 @@ public final class HandlerResponse
|
|||
{
|
||||
clients ~= clientList[i].str();
|
||||
}
|
||||
|
||||
/* TODO: Implement me */
|
||||
|
||||
writeln("Users wanting to send to ", clients);
|
||||
|
||||
/* Find the users that are wanting to be sent to */
|
||||
BesterConnection[] connectionList = originalRequester.server.getClients(clients);
|
||||
writeln(connectionList);
|
||||
|
||||
/* TODO: Implement me */
|
||||
|
||||
writeln("sdafdfasd", originalRequester.server.clients[0].toString());
|
||||
}
|
||||
else if (commandType == CommandType.SEND_SERVERS)
|
||||
|
|
|
@ -39,13 +39,13 @@ public final class BesterServer
|
|||
/* Search through the provided usernames */
|
||||
for(ulong i = 0; i < usernames.length; i++)
|
||||
{
|
||||
for(ulong k = 0; k < clients.lenght; k++)
|
||||
for(ulong k = 0; k < clients.length; k++)
|
||||
{
|
||||
/* The potentially-matched user */
|
||||
BesterConnection potentialMatch = clients[k];
|
||||
|
||||
/* Check if the user is authenticated */
|
||||
if(potentialMatch.isUser() && cmp(potentialMatch.getCredentials()[0], usernames[i])
|
||||
if(potentialMatch.isUser() && cmp(potentialMatch.getCredentials()[0], usernames[i]))
|
||||
{
|
||||
matchedUsers ~= potentialMatch;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue