1
0
mirror of https://github.com/moparisthebest/Yaaic synced 2024-11-29 04:12:18 -05:00

Bugfix: Remember new nickname on auto nickname change (433: Nickname is already in use)

This commit is contained in:
Sebastian Kaspari 2011-04-12 22:06:54 +02:00
parent 2b3ce5132a
commit aa5a081c02

View File

@ -179,6 +179,7 @@ public abstract class PircBot implements ReplyConstants {
InputStreamReader inputStreamReader = null;
OutputStreamWriter outputStreamWriter = null;
if (getEncoding() != null) {
// Assume the specified encoding is valid for this JVM.
inputStreamReader = new InputStreamReader(_socket.getInputStream(), getEncoding());
@ -233,7 +234,6 @@ public abstract class PircBot implements ReplyConstants {
}
this.onConnect();
}
@ -880,10 +880,10 @@ public abstract class PircBot implements ReplyConstants {
if (_autoNickChange) {
List<String> aliases = getAliases();
_autoNickTries++;
String nick = ((_autoNickTries - 1) <= aliases.size()) ?
_nick = ((_autoNickTries - 1) <= aliases.size()) ?
aliases.get(_autoNickTries - 2) :
getName() + (_autoNickTries - aliases.size());
this.sendRawLineViaQueue("NICK " + nick);
this.sendRawLineViaQueue("NICK " + _nick);
}
else {
_socket.close();