Trying to fix "invalid nick" problems with IRC reconnect.
This commit is contained in:
@@ -45,6 +45,7 @@ struct IrcContext {
|
|||||||
string serverAddress;
|
string serverAddress;
|
||||||
unsigned serverPort;
|
unsigned serverPort;
|
||||||
bool useIPv6;
|
bool useIPv6;
|
||||||
|
string origNick;
|
||||||
string nick;
|
string nick;
|
||||||
string channel;
|
string channel;
|
||||||
string channelPassword;
|
string channelPassword;
|
||||||
@@ -269,7 +270,8 @@ IrcThread::IrcThread(const IrcThread &other)
|
|||||||
context.serverAddress = otherContext.serverAddress;
|
context.serverAddress = otherContext.serverAddress;
|
||||||
context.serverPort = otherContext.serverPort;
|
context.serverPort = otherContext.serverPort;
|
||||||
context.useIPv6 = otherContext.useIPv6;
|
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.channel = otherContext.channel;
|
||||||
context.channelPassword = otherContext.channelPassword;
|
context.channelPassword = otherContext.channelPassword;
|
||||||
}
|
}
|
||||||
@@ -301,6 +303,7 @@ IrcThread::Init(const std::string &serverAddress, unsigned serverPort, bool ipv6
|
|||||||
context.serverAddress = serverAddress;
|
context.serverAddress = serverAddress;
|
||||||
context.serverPort = serverPort;
|
context.serverPort = serverPort;
|
||||||
context.useIPv6 = ipv6;
|
context.useIPv6 = ipv6;
|
||||||
|
context.origNick = nick;
|
||||||
context.nick = nick;
|
context.nick = nick;
|
||||||
context.channel = channel;
|
context.channel = channel;
|
||||||
context.channelPassword = channelPassword;
|
context.channelPassword = channelPassword;
|
||||||
|
|||||||
Reference in New Issue
Block a user