1
0
mirror of https://github.com/deavminet/dnetd synced 2024-09-21 17:53:39 +02:00

Added getStatus message

This commit is contained in:
Tristan B. Kildaire 2020-10-20 07:57:27 +02:00
parent 759d1623a1
commit 95d2c2adc9

View File

@ -337,6 +337,31 @@ public class DServer : Thread
return currentChannels;
}
public string getStatusMessage(string username)
{
/* Lock the connections list */
connectionLock.lock();
/* The matching connection */
DConnection matchedConnection;
/* Find the connection */
foreach(DConnection connection; connectionQueue)
{
if(cmp(connection.getUsername(), username) == 0)
{
matchedConnection = connection;
break;
}
}
/* Unlock the connections list */
connectionLock.unlock();
return matchedConnection.getStatusMessage(username);
}
public string getServerInfo()
{
/* The server information */