From b0f30acb5bf7b5dd595ce2010e9e0969844d8dcf Mon Sep 17 00:00:00 2001 From: "Tristan B. Kildaire" Date: Mon, 28 Sep 2020 19:46:03 +0200 Subject: [PATCH] Code cleanup --- source/dnetd/dconnection.d | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/source/dnetd/dconnection.d b/source/dnetd/dconnection.d index fbea882..6c68a33 100644 --- a/source/dnetd/dconnection.d +++ b/source/dnetd/dconnection.d @@ -318,20 +318,13 @@ public class DConnection : Thread bool isPresentInfo = false; foreach(string channelName; channels) { - // /* Attempt to find the channel */ - // DChannel channel = server.getChannelByName(channelName); -// - // /* Create the channel if it doesn't exist */ - // if(channel is null) - // { - // /* TODO: Thread safety for name choice */ - // channel = new DChannel(channelName); - // - // server.addChannel(this, channel); - // } + /** + * Finds the channel, if it exists then it returns it, + * if it does not exist then it will create it and then + * return it + */ DChannel channel = server.getChannel(this, channelName); - /* Join the channel */ isPresentInfo = channel.join(this); }