mirror of
https://github.com/moparisthebest/Yaaic
synced 2024-11-26 02:42:16 -05:00
Use nickname and ident of the identity
This commit is contained in:
parent
e61dbe86ae
commit
01f03747b0
@ -58,7 +58,12 @@ public class IRCBinder extends Binder
|
|||||||
new Thread() {
|
new Thread() {
|
||||||
public void run() {
|
public void run() {
|
||||||
try {
|
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) {
|
catch (Exception e) {
|
||||||
Log.d(TAG, "Exception: " + e.getMessage());
|
Log.d(TAG, "Exception: " + e.getMessage());
|
||||||
|
@ -60,11 +60,29 @@ public class IRCConnection extends PircBot
|
|||||||
this.server = Yaaic.getInstance().getServerById(serverId);
|
this.server = Yaaic.getInstance().getServerById(serverId);
|
||||||
this.service = service;
|
this.service = service;
|
||||||
|
|
||||||
this.setName("Yaaic");
|
|
||||||
this.setLogin("Yaaic");
|
|
||||||
this.setAutoNickChange(true);
|
this.setAutoNickChange(true);
|
||||||
this.setVersion("Yaaic - Yet another Android IRC client - http://www.yaaic.org");
|
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
|
* On connect
|
||||||
|
Loading…
Reference in New Issue
Block a user