Mercurial > hg > bitcoin
changeset 620:a081c04fffa7 draft
irc: #bitcoin is overflowing. split up into 100 randomly-joined channels.
From laszlo
author | Jeff Garzik <jeff@garzik.org> |
---|---|
date | Fri, 20 May 2011 20:54:51 -0400 |
parents | f96544d5b627 |
children | 6fcffbe678c3 9c304f1f13d4 3e692d49bb76 4e574f5be383 9437bfbe5201 45710707d5cc 7b8f21eae129 b52db9e6b231 5fbfc07d9ae8 |
files | src/irc.cpp |
diffstat | 1 files changed, 10 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/irc.cpp +++ b/src/irc.cpp @@ -339,9 +339,16 @@ 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;