diff --git a/cs656/lab4/ChatClient.java b/cs656/lab4/ChatClient.java index c427512..a7a706d 100644 --- a/cs656/lab4/ChatClient.java +++ b/cs656/lab4/ChatClient.java @@ -324,7 +324,7 @@ public class ChatClient public static void main(String[] args) { - String user = "user"; + String user = null; String host = "localhost"; int port = 42842; @@ -343,6 +343,9 @@ public class ChatClient } } + if (user == null) + usage(); + PresenceService pServ = new PresenceServiceImpl(host, port); ChatClient chatClient = new ChatClient(pServ, user); @@ -351,7 +354,7 @@ public class ChatClient private static void usage() { - System.err.println("Usage: java ChatClient [-master] {user} {host}"); + System.err.println("Usage: java ChatClient {host}"); System.exit(42); } }