mirror of
https://github.com/deavminet/dnetd.git
synced 2025-02-17 21:17:46 +00:00
Now 'part' and 'join' commands require connection type to be CLIENT
This commit is contained in:
parent
26f24f12c8
commit
3f2e308263
@ -197,8 +197,8 @@ public class DConnection : Thread
|
|||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
/* If `join` command (requires: authed) */
|
/* If `join` command (requires: authed, client) */
|
||||||
else if(commandByte == 3 && hasAuthed)
|
else if(commandByte == 3 && hasAuthed && connType == ConnectionType.CLIENT)
|
||||||
{
|
{
|
||||||
/* Get the channel names */
|
/* Get the channel names */
|
||||||
string channelList = cast(string)message.data[1..message.data.length];
|
string channelList = cast(string)message.data[1..message.data.length];
|
||||||
@ -232,8 +232,8 @@ public class DConnection : Thread
|
|||||||
/* TODO: Implement me, use return value */
|
/* TODO: Implement me, use return value */
|
||||||
writeSocket(tag, reply);
|
writeSocket(tag, reply);
|
||||||
}
|
}
|
||||||
/* If `part` command (requires: authed) */
|
/* If `part` command (requires: authed, client) */
|
||||||
else if(commandByte == 4 && hasAuthed)
|
else if(commandByte == 4 && hasAuthed && connType == ConnectionType.CLIENT)
|
||||||
{
|
{
|
||||||
/* Get the channel names */
|
/* Get the channel names */
|
||||||
string channelList = cast(string)message.data[1..message.data.length];
|
string channelList = cast(string)message.data[1..message.data.length];
|
||||||
@ -262,8 +262,8 @@ public class DConnection : Thread
|
|||||||
/* TODO: Implement me, use return value */
|
/* TODO: Implement me, use return value */
|
||||||
writeSocket(tag, reply);
|
writeSocket(tag, reply);
|
||||||
}
|
}
|
||||||
/* If `list` command (requires: authed) */
|
/* If `list` command (requires: authed, client) */
|
||||||
else if(commandByte == 6 && hasAuthed)
|
else if(commandByte == 6 && hasAuthed && connType == ConnectionType.CLIENT)
|
||||||
{
|
{
|
||||||
/* Get all channels */
|
/* Get all channels */
|
||||||
DChannel[] channels = server.getChannels();
|
DChannel[] channels = server.getChannels();
|
||||||
|
Loading…
Reference in New Issue
Block a user