Request message of the day on connection

This commit is contained in:
Tristan B. Kildaire 2020-10-02 16:53:47 +02:00
parent 2f562165b7
commit d498958e29
1 changed files with 9 additions and 0 deletions

View File

@ -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())