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

Fixed toString

This commit is contained in:
Tristan 🅱. Kildaire 2020-09-23 21:40:22 +02:00
parent 41b84fa2a1
commit e2b0ec0846
2 changed files with 18 additions and 1 deletions

View File

@ -61,7 +61,17 @@ public class DChannel
public override string toString() public override string toString()
{ {
return "DChannel [Name: "~name~", Members: "~to!(string)(members)~"]"; string toStr;
/* Lock the members list */
memberLock.lock();
toStr = "DChannel [Name: "~name~", Members: "~to!(string)(members)~"]";
/* Unlock the members list */
memberLock.unlock();
return toStr;
} }
} }

View File

@ -199,6 +199,13 @@ public class DConnection : Thread
/* Join the channel */ /* Join the channel */
channel.join(this); channel.join(this);
} }
/* TODO: Do reply */
/* Encode the reply */
byte[] reply = [true];
/* TODO: Implement me, use return value */
writeSocket(tag, reply);
} }
/* TODO: Handle this case */ /* TODO: Handle this case */
else else