From 3dee7370a928828781863ad09ee60ae89fd3b692 Mon Sep 17 00:00:00 2001 From: lotodore Date: Wed, 2 May 2012 08:48:52 +0000 Subject: [PATCH] Trying to fix "invalid nick" problems with IRC reconnect. --- src/net/common/ircthread.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/net/common/ircthread.cpp b/src/net/common/ircthread.cpp index 52b17c70..a487f8a3 100644 --- a/src/net/common/ircthread.cpp +++ b/src/net/common/ircthread.cpp @@ -45,6 +45,7 @@ struct IrcContext { string serverAddress; unsigned serverPort; bool useIPv6; + string origNick; string nick; string channel; string channelPassword; @@ -269,7 +270,8 @@ IrcThread::IrcThread(const IrcThread &other) context.serverAddress = otherContext.serverAddress; context.serverPort = otherContext.serverPort; context.useIPv6 = otherContext.useIPv6; - context.nick = otherContext.nick; + context.origNick = otherContext.origNick; + context.nick = otherContext.origNick; // do not use changed nick. context.channel = otherContext.channel; context.channelPassword = otherContext.channelPassword; } @@ -301,6 +303,7 @@ IrcThread::Init(const std::string &serverAddress, unsigned serverPort, bool ipv6 context.serverAddress = serverAddress; context.serverPort = serverPort; context.useIPv6 = ipv6; + context.origNick = nick; context.nick = nick; context.channel = channel; context.channelPassword = channelPassword;