aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2011-05-20 20:54:51 -0400
committerJeff Garzik <jgarzik@pobox.com>2011-05-20 20:54:51 -0400
commit69a27a4ec68e7a2ea6e481b950d11f5aea42c814 (patch)
tree8cf4e1fda3751bc24e4d68858a75e9954306b129 /src
parent69ae372b51cd589a3ac0b1ad09b0ebb90c1b6861 (diff)
irc: #bitcoin is overflowing. split up into 100 randomly-joined channels.v0.3.22rc3
From laszlo
Diffstat (limited to 'src')
-rw-r--r--src/irc.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/irc.cpp b/src/irc.cpp
index 5dc1d64305..a76374d143 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;