2 * Java client for Citadel/UX
3 * Copyright (C) 1997 by Art Cancro - All Rights Reserved
5 * This module is designed to be able to run either as an application or
11 public class wcchat extends Applet {
13 String ServerHost = "uncensored.citadel.org";
18 /* Unless overridden, the Citadel server is expected to be
19 * the same as the applet host. In most cases this is all
20 * that's allowed anyway.
22 if (getDocumentBase() != null) {
23 ServerHost = getDocumentBase().getHost();
26 /* The 'host' parameter tells the client to look somewhere other
27 * than the applet host for the Citadel server.
28 */ if (getParameter("host") != null) {
29 ServerHost = getParameter("host");
32 /* The 'port' parameter tells the client to look on a
33 * nonstandard port for the Citadel server.
35 if (getParameter("port") != null) {
37 Integer.parseInt(getParameter("port"));
43 wcCitServer serv = new wcCitServer();
46 serv.AttachToServer(ServerHost, ServerPort);
47 buf = serv.ServTrans("USER " + getParameter("username"));
48 if (buf.charAt(0) == '3') {
50 serv.ServTrans("PASS " +
51 getParameter("password"));
52 if (buf.charAt(0) == '2') {
53 serv.SetUserName(wcCitUtil.
54 Extract(buf.substring(4),
57 serv.ServTrans("GOTO " +
60 new MultiUserChat102(serv, this);
63 System.out.println("ooops...");