git-svn-id: svn://anubis/gvsu@222 45c1a28c-8058-47b2-ae61-ca45b979098e
This commit is contained in:
josh 2008-10-27 23:04:21 +00:00
parent 805811d6ec
commit b1257e8ae4
2 changed files with 13 additions and 6 deletions

View File

@ -225,6 +225,12 @@ public class ChatClient
{ {
user = rest.substring(0, idx); user = rest.substring(0, idx);
RegistrationInfo ri = myPServ.lookup(user); RegistrationInfo ri = myPServ.lookup(user);
if (ri == null)
{
System.err.println("Could not find user \"" + user + "\"!");
}
else
{
/* only send a message to available users */ /* only send a message to available users */
if (ri.getStatus()) if (ri.getStatus())
{ {
@ -236,6 +242,7 @@ public class ChatClient
System.out.println(user + " is busy!"); System.out.println(user + " is busy!");
} }
} }
}
else else
{ {
System.out.println("Syntax: talk {user} {message}"); System.out.println("Syntax: talk {user} {message}");

View File

@ -43,7 +43,7 @@ public class ChordClient
URL localURL = null; URL localURL = null;
try try
{ {
localURL = new URL( protocol + "://" + host + ":5353/"); localURL = new URL(protocol + "://" + host + ":5353/");
} }
catch (MalformedURLException e) catch (MalformedURLException e)
{ {