From 8ee4fdf3b59dc718b6ba5f422a73d1727688d79d Mon Sep 17 00:00:00 2001 From: "Tristan B. Kildaire" Date: Thu, 15 Oct 2020 14:07:01 +0200 Subject: [PATCH] Implemented `memberinfo` command --- source/dnetd/dconnection.d | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/source/dnetd/dconnection.d b/source/dnetd/dconnection.d index 2e550a7..561df16 100644 --- a/source/dnetd/dconnection.d +++ b/source/dnetd/dconnection.d @@ -612,7 +612,22 @@ public class DConnection : Thread /* If `memberinfo` command (requires: authed, client) */ else if(command == Command.MEMBER_INFO && hasAuthed && connType == ConnectionType.CLIENT) { + /* Status */ + bool status = true; + /* TODO: Implement me */ + + /* TODO: fetch longontime, serveron, status */ + string logontime; + string serveron; + + /* Encode the reply */ + reply ~= [status]; + reply ~= [cast(byte)logontime.length]; + reply ~= logontime; + reply ~= [cast(byte)serveron.length]; + reply ~= serveron; + reply ~= getStatusMessage(); } /* If `status` command (requires: authed, client) */ else if(command == Command.STATUS && hasAuthed && connType == ConnectionType.CLIENT)