IRC IPv6 support.

This commit is contained in:
lotodore
2007-10-08 11:07:32 +00:00
parent d11b35a1a7
commit d0ccc68d1f
11 changed files with 193 additions and 16 deletions
+7 -1
View File
@@ -316,7 +316,13 @@ IrcThread::Main()
irc_session_t *s = context.session;
if (s)
{
if (irc_connect(s, context.serverAddress.c_str(), context.serverPort, 0, context.nick.c_str(), 0, 0) != 0)
bool connected = false;
if (context.useIPv6)
connected = irc_connect6(s, context.serverAddress.c_str(), context.serverPort, 0, context.nick.c_str(), 0, 0) == 0;
else
connected = irc_connect(s, context.serverAddress.c_str(), context.serverPort, 0, context.nick.c_str(), 0, 0) == 0;
if (!connected)
HandleIrcError(irc_errno(s));
else
{