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

Added code to send a message to a channel for the 'msg' command

This commit is contained in:
Tristan B. Kildaire 2020-09-24 15:01:23 +02:00
parent 3f2e308263
commit 9236b54515

View File

@ -319,10 +319,14 @@ public class DConnection : Thread
/* If we are sending to a channel */ /* If we are sending to a channel */
else if(messageType == cast(ubyte)1) else if(messageType == cast(ubyte)1)
{ {
/* The channel wanting to send to */
DChannel channel = server.getChannelByName(destination);
/* If the channel exists */ /* If the channel exists */
if(server.getChannelByName(destination)) if(channel)
{ {
/* TODO Implemet me */ /* TODO Implemet me */
channel.sendMessage(this, msg);
} }
/* If the channel does not exist */ /* If the channel does not exist */
else else