git-svn-id: svn://anubis/gvsu@282 45c1a28c-8058-47b2-ae61-ca45b979098e
This commit is contained in:
josh 2008-11-29 17:46:25 +00:00
parent 814a9044e9
commit 25dec41f05

View File

@ -324,7 +324,7 @@ public class ChatClient
public static void main(String[] args) public static void main(String[] args)
{ {
String user = "user"; String user = null;
String host = "localhost"; String host = "localhost";
int port = 42842; int port = 42842;
@ -343,6 +343,9 @@ public class ChatClient
} }
} }
if (user == null)
usage();
PresenceService pServ = new PresenceServiceImpl(host, port); PresenceService pServ = new PresenceServiceImpl(host, port);
ChatClient chatClient = new ChatClient(pServ, user); ChatClient chatClient = new ChatClient(pServ, user);
@ -351,7 +354,7 @@ public class ChatClient
private static void usage() private static void usage()
{ {
System.err.println("Usage: java ChatClient [-master] {user} {host}"); System.err.println("Usage: java ChatClient <username> {host}");
System.exit(42); System.exit(42);
} }
} }