} else if (command.equals("helloreplies")) { StringBuffer buf = new StringBuffer(""); int tokens = tok.countTokens(); this.helloreplies = new String[tokens]; for (int i = 0; i < tokens; i++) { this.helloreplies[i] = tok.nextToken(); buf.append(this.helloreplies[i] + " "); } log("hello changed to " + buf);
	void parseConfig(String filename) {		log("Parsing " + filename);		BufferedReader configIn;		try {			configIn = new BufferedReader(new FileReader(filename));		} catch (IOException ioe) {			logerror("Couldn't open cfg file " + filename + ".");			return;		}		try {			while(configIn.ready()) {				String line = configIn.readLine();				StringTokenizer tok = new StringTokenizer(line, " ");				if (line.startsWith("//") || !tok.hasMoreElements()) {					continue;				}				String command = tok.nextToken();				if (command.equals("name")) {					this.name = tok.nextToken("").trim();					log("name changed to " + this.name);				} else if (command.equals("server")) {					this.network = tok.nextToken("").trim();					log("network changed to " + this.network);				} else if (command.equals("port")) {					this.port = Integer.parseInt(tok.nextToken("").trim());					log("port changed to " + this.port);				} else if (command.equals("greeting")) {					StringBuffer greeting = new StringBuffer(tok.nextToken("").trim());					greeting = replaceKeywords(greeting);					this.greeting = greeting.toString();					log("greeting changed to " + this.greeting);/*				} else if (command.equals("spell")) {					StringBuffer greeting = new StringBuffer(tok.nextToken("").trim());					greeting = replaceKeywords(greeting);					this.spell = greeting.toString();					log("spell changed to " + this.spell);*/				} else if (command.equals("channels")) {					StringBuffer buf = new StringBuffer("");					int tokens = tok.countTokens();					this.channels = new String[tokens];					for (int i = 0; i < tokens; i++) {						this.channels[i] = tok.nextToken();						buf.append(this.channels[i] + " ");					}					log("channels changed to " + buf);				} else if (command.equals("hello")) {					StringBuffer buf = new StringBuffer("");					int tokens = tok.countTokens();					this.hellos = new String[tokens];					for (int i = 0; i < tokens; i++) {						this.hellos[i] = tok.nextToken();						buf.append(this.hellos[i] + " ");					}					log("hello changed to " + buf);				} else if (command.equals("logdir")) {					this.logdir = tok.nextToken("").trim();					log("logdir changed to " + this.logdir);				} else if (command.equals("sephiadir")) {					this.sephiadir = tok.nextToken("").trim();					log("sephiadir changed to " + this.sephiadir);				}			}		} catch (IOException ioe) {			logerror("Couldn't read cfg file " + filename + ".");		}			}