Skip to content

Commit

Permalink
irc: #bitcoin is overflowing. split up into 100 randomly-joined chann…
Browse files Browse the repository at this point in the history
…els.

From laszlo
  • Loading branch information
Jeff Garzik authored and jgarzik committed May 21, 2011
1 parent 69ae372 commit 69a27a4
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/irc.cpp
Expand Up @@ -339,9 +339,16 @@ void ThreadIRCSeed2(void* parg)
Send(hSocket, strprintf("NICK %s\r", strMyName.c_str()).c_str()); Send(hSocket, strprintf("NICK %s\r", strMyName.c_str()).c_str());
} }
} }


Send(hSocket, fTestNet ? "JOIN #bitcoinTEST\r" : "JOIN #bitcoin\r"); if (fTestNet) {
Send(hSocket, fTestNet ? "WHO #bitcoinTEST\r" : "WHO #bitcoin\r"); 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(); int64 nStart = GetTime();
string strLine; string strLine;
Expand Down

0 comments on commit 69a27a4

Please sign in to comment.