]> Pileus Git - ~andy/spades/blobdiff - src/org/pileus/spades/Client.java
Add /join and /part commands
[~andy/spades] / src / org / pileus / spades / Client.java
index 3e9e3400b3480daeab2dcac0bdb1b0f05e7bcb8f..f1657840c02924a06864a4b85e9ba885f4b69e72 100644 (file)
@@ -102,7 +102,11 @@ public class Client
 
        public Message send(String txt)
        {
+               if (!this.ready)
+                       return null;
                Message msg = new Message(this.channel, this.name, txt);
+               if (msg.type == Message.Type.JOIN)
+                       this.channel = msg.msg;
                this.raw(msg.line);
                return msg;
        }