1
0
mirror of https://github.com/moparisthebest/Yaaic synced 2024-11-22 08:52:18 -05:00

Use nickname and ident of the identity

This commit is contained in:
Sebastian Kaspari 2010-03-13 14:58:01 +01:00
parent e61dbe86ae
commit 01f03747b0
2 changed files with 26 additions and 3 deletions

View File

@ -58,7 +58,12 @@ public class IRCBinder extends Binder
new Thread() {
public void run() {
try {
getService().getConnection(server.getId()).connect(server.getHost());
IRCConnection connection = getService().getConnection(server.getId());
connection.setNickname(server.getIdentity().getNickname());
connection.setIdent(server.getIdentity().getIdent());
connection.connect(server.getHost());
}
catch (Exception e) {
Log.d(TAG, "Exception: " + e.getMessage());

View File

@ -60,11 +60,29 @@ public class IRCConnection extends PircBot
this.server = Yaaic.getInstance().getServerById(serverId);
this.service = service;
this.setName("Yaaic");
this.setLogin("Yaaic");
this.setAutoNickChange(true);
this.setVersion("Yaaic - Yet another Android IRC client - http://www.yaaic.org");
}
/**
* Set the nickname of the user
*
* @param nickname The nickname to use
*/
public void setNickname(String nickname)
{
this.setName(nickname);
}
/**
* Set the ident of the user
*
* @param ident The ident to use
*/
public void setIdent(String ident)
{
this.setLogin(ident);
}
/**
* On connect