/* Public data */
public boolean ready = false;
+ public String name = "";
/* Connection data */
private Socket socket;
{
this.nickname = nickname;
this.channel = channel;
+ this.name = nickname;
}
public boolean connect()
Os.debug("Client: connected");
if (this.usesasl)
this.raw("CAP REQ :sasl");
- this.raw("USER "+this.username+" "+this.hostname+" "+this.server+" :"+this.nickname);
- this.raw("NICK "+this.nickname);
+ this.raw("USER "+this.username+" "+this.hostname+" "+this.server+" :"+this.name);
+ this.raw("NICK "+this.name);
return true;
}
public Message send(String txt)
{
- Message msg = new Message(this.channel, this.nickname, txt);
+ Message msg = new Message(this.channel, this.name, txt);
this.raw(msg.line);
return msg;
}
if (line == null)
return null;
Os.debug("> " + line);
- Message msg = new Message(line);
+ Message msg = new Message(line, this.name);
this.process(msg);
if (this.usesasl)
this.dosasl(msg);
this.ready = true;
}
if (msg.cmd.equals("433")) {
- this.raw("NICK "+this.nickname+this.mangle);
- this.mangle++;
+ this.name = this.nickname + this.mangle;
+ this.mangle = this.mangle + 11;
+ this.raw("NICK " + this.name);
}
if (msg.cmd.equals("PING")) {
this.raw("PING " + msg.msg);