Added 'names' command

This commit is contained in:
Tristan B. Kildaire 2020-09-30 10:16:11 +02:00
parent 914d00935d
commit b5091dbf3d
4 changed files with 12 additions and 6 deletions

View File

@ -4,7 +4,7 @@
],
"copyright": "Copyright © 2020, Tristan B. Kildaire",
"dependencies": {
"libdnet": "~>0.0.4",
"libdnet": "~>0.0.5",
"tristanable": "~>0.0.33"
},
"description": "dnet client",

View File

@ -2,7 +2,7 @@
"fileVersion": 1,
"versions": {
"bformat": "1.0.8",
"libdnet": "0.0.4",
"libdnet": "0.0.5",
"tristanable": "0.0.33"
}
}

View File

@ -166,6 +166,12 @@ void commandLine()
writeln(to!(string)(memberCount)~")");
}
}
/* If the command is `names` */
else if(cmp(command, "names") == 0)
{
string[] members = dclient.getMembers(currentChannel);
writeln(members);
}
/* If the command is `join` */
else if(cmp(command, "join") == 0)
{

View File

@ -28,12 +28,12 @@ public class NotificationWatcher : Thread
if(notifications.length)
{
writeln(notifications);
//writeln(notifications);
foreach(NotificationReply notificationReply; notifications)
{
writeln(notificationReply.getData());
//writeln(notificationReply.getData());
string msg = cast(string)notificationReply.getData();
writeln("!> "~msg);
//writeln("!> "~msg);
process(notificationReply.getData());
}
}
@ -64,7 +64,7 @@ public class NotificationWatcher : Thread
{
/* TODO: Decode using tristanable */
/* TODO: Get the username of the user that left */
writeln("user left/join message");
//writeln("user left/join message");
/* Get the sub-type */
byte subType = data[1];