]> Pileus Git - ~andy/spades/commitdiff
Add nickname mangling
authorAndy Spencer <andy753421@gmail.com>
Sat, 13 Apr 2013 02:00:14 +0000 (02:00 +0000)
committerAndy Spencer <andy753421@gmail.com>
Sat, 13 Apr 2013 02:00:14 +0000 (02:00 +0000)
src/org/pileus/spades/Client.java

index 693ec551b19fc0f11e30800aecf37d745e190724..a98c53dbdd466959ff179d5eb2ef71758e814315 100644 (file)
@@ -17,6 +17,8 @@ public class Client
        private BufferedReader input    = null;
        private PrintWriter    output   = null;
 
        private BufferedReader input    = null;
        private PrintWriter    output   = null;
 
+       private int            mangle   = 0;
+
        /* Public data */
        public  boolean        ready    = false;
 
        /* Public data */
        public  boolean        ready    = false;
 
@@ -116,6 +118,10 @@ public class Client
                        this.raw("TOPIC " + this.channel);
                        this.ready = true;
                }
                        this.raw("TOPIC " + this.channel);
                        this.ready = true;
                }
+               if (msg.cmd.equals("433")) {
+                       this.raw("NICK "+this.nickname+this.mangle);
+                       this.mangle++;
+               }
                if (msg.cmd.equals("PING")) {
                        this.raw("PING " + msg.msg);
                }
                if (msg.cmd.equals("PING")) {
                        this.raw("PING " + msg.msg);
                }