- if (msg.cmd.equals("PRIVMSG")) {
- this.log.append(msg.from + ": " + msg.msg + "\n");
- this.lscroll.smoothScrollTo(0, this.log.getBottom());
+ // Chat
+ switch (msg.type) {
+ case PRIVMSG:
+ this.log.append(msg.from + ": " + msg.msg + "\n");
+ break;
+ case TOPIC:
+ if (!msg.txt.equals(this.topic))
+ this.notice("Topic for " + msg.arg + ": " + msg.txt);
+ this.topic = msg.txt;
+ break;
+ case NAMES:
+ if (!msg.txt.equals(this.names))
+ this.notice("Users in " + msg.arg + ": " + msg.txt);
+ this.names = msg.txt;
+ break;
+ case ERROR:
+ this.notice("Error: " + msg.txt);
+ break;
+ case AUTHOK:
+ this.notice("Authentication succeeded: " + msg.txt);
+ break;
+ case AUTHFAIL:
+ this.notice("Authentication failed: " + msg.txt);
+ break;