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

Added neew properties system.

This commit is contained in:
Tristan B. Kildaire 2020-10-20 08:17:48 +02:00
parent 95d2c2adc9
commit f20a02635e

View File

@ -60,6 +60,7 @@ public class DConnection : Thread
private ConnectionType connType; private ConnectionType connType;
private string username; private string username;
private string currentStatus; private string currentStatus;
private string[string] properties; /* TODO: New, replace old status mechanism */
/* Write lock for socket */ /* Write lock for socket */
/* TODO: Forgot how bmessage works, might need, might not, if multipel calls /* TODO: Forgot how bmessage works, might need, might not, if multipel calls
@ -795,6 +796,23 @@ public class DConnection : Thread
return statusMessage; return statusMessage;
} }
/**
* Sets a property for this user
*/
public void setProperty(string propertyName, string propertyValue)
{
properties[propertyName] = propertyValue;
}
/**
* Returns a property
*/
public string getProperty(string propertyName)
{
/* TODO: Error handling */
return "";
}
public ConnectionType getConnectionType() public ConnectionType getConnectionType()
{ {
return connType; return connType;