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