mirror of
https://github.com/deavminet/dnetd
synced 2024-09-21 17:53:39 +02:00
Added getStatus message
This commit is contained in:
parent
759d1623a1
commit
95d2c2adc9
@ -337,6 +337,31 @@ public class DServer : Thread
|
|||||||
return currentChannels;
|
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()
|
public string getServerInfo()
|
||||||
{
|
{
|
||||||
/* The server information */
|
/* The server information */
|
||||||
|
Loading…
Reference in New Issue
Block a user