only send regular talk messages to users if they are available
git-svn-id: svn://anubis/gvsu@160 45c1a28c-8058-47b2-ae61-ca45b979098e
This commit is contained in:
parent
c7e988e92b
commit
9d9f1cbd76
@ -238,10 +238,18 @@ public class ChatClient
|
||||
{
|
||||
user = rest.substring(0, idx);
|
||||
RegistrationInfo ri = myPServ.lookup(user);
|
||||
/* only send a message to available users */
|
||||
if (ri.getStatus())
|
||||
{
|
||||
String message = rest.substring(idx + 1);
|
||||
sendUserMessage(user, message);
|
||||
}
|
||||
else
|
||||
{
|
||||
System.out.println(user + " is busy!");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
System.out.println("Syntax: talk {user} {message}");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user