From d498958e29c614d5a5bacea6218d8fa7a62608c7 Mon Sep 17 00:00:00 2001 From: "Tristan B. Kildaire" Date: Fri, 2 Oct 2020 16:53:47 +0200 Subject: [PATCH] Request message of the day on connection --- source/app.d | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/source/app.d b/source/app.d index 42aa33e..26311f4 100644 --- a/source/app.d +++ b/source/app.d @@ -131,6 +131,9 @@ void commandLine() dnotifications= new NotificationWatcher(dclient.getManager()); writeln("Connected!"); + /* Get the message of the day */ + serverGreet(); + if(isConfigConnect) { string server = elements[1]; @@ -224,6 +227,12 @@ void commandLine() } +void serverGreet() +{ + string motd = dclient.motd(); + writeln("!~> "~motd); +} + void configAutoJoin(string server) { foreach(JSONValue value; config["servers"][server]["channels"].array())