Skip to content

Commit

Permalink
Bugfix: Remember new nickname on auto nickname change (433: Nickname …
Browse files Browse the repository at this point in the history
…is already in use)
  • Loading branch information
pocmo committed Apr 12, 2011
1 parent 2b3ce51 commit aa5a081
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions application/src/org/jibble/pircbot/PircBot.java
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ public final synchronized void connect(String hostname, int port, String passwor

InputStreamReader inputStreamReader = null;
OutputStreamWriter outputStreamWriter = null;

if (getEncoding() != null) {
// Assume the specified encoding is valid for this JVM.
inputStreamReader = new InputStreamReader(_socket.getInputStream(), getEncoding());
Expand Down Expand Up @@ -233,7 +234,6 @@ public final synchronized void connect(String hostname, int port, String passwor
}

this.onConnect();

}


Expand Down Expand Up @@ -880,10 +880,10 @@ protected void handleLine(String line) throws NickAlreadyInUseException, IOExcep
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();
Expand Down

0 comments on commit aa5a081

Please sign in to comment.