From: Jeff Garzik Date: Sat, 21 May 2011 00:54:51 +0000 (-0400) Subject: irc: #bitcoin is overflowing. split up into 100 randomly-joined channels. X-Git-Tag: v0.4.0-unstable~234^2~68 X-Git-Url: https://git.novaco.in/?p=novacoin.git;a=commitdiff_plain;h=69a27a4ec68e7a2ea6e481b950d11f5aea42c814 irc: #bitcoin is overflowing. split up into 100 randomly-joined channels. From laszlo --- diff --git a/src/irc.cpp b/src/irc.cpp index 5dc1d64..a76374d 100644 --- a/src/irc.cpp +++ b/src/irc.cpp @@ -339,9 +339,16 @@ void ThreadIRCSeed2(void* parg) Send(hSocket, strprintf("NICK %s\r", strMyName.c_str()).c_str()); } } - - Send(hSocket, fTestNet ? "JOIN #bitcoinTEST\r" : "JOIN #bitcoin\r"); - Send(hSocket, fTestNet ? "WHO #bitcoinTEST\r" : "WHO #bitcoin\r"); + + if (fTestNet) { + Send(hSocket, "JOIN #bitcoinTEST\r"); + Send(hSocket, "WHO #bitcoinTEST\r"); + } else { + // randomly join #bitcoin00-#bitcoin99 + int channel_number = GetRandInt(100); + Send(hSocket, strprintf("JOIN #bitcoin%02d\r", channel_number).c_str()); + Send(hSocket, strprintf("WHO #bitcoin%02d\r", channel_number).c_str()); + } int64 nStart = GetTime(); string strLine;