aboutsummaryrefslogtreecommitdiff
path: root/irc.cpp
diff options
context:
space:
mode:
authors_nakamoto <s_nakamoto@1a98c847-1fd6-4fd8-948a-caf3550aa51b>2009-11-01 01:16:51 +0000
committers_nakamoto <s_nakamoto@1a98c847-1fd6-4fd8-948a-caf3550aa51b>2009-11-01 01:16:51 +0000
commit4ac57f013e20da2d0f87fff69625cbd4419089f3 (patch)
tree8120216e7ebfdc54244835dfa5650f1181b57025 /irc.cpp
parent5750932cdf72ea9b5e64b8a05b43c42f5acb417d (diff)
move debug.log and db.log to data dir, portable GetDataDir, optimize GetBalance, fix repaint bogdown, -addnode and -? switches
git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@25 1a98c847-1fd6-4fd8-948a-caf3550aa51b
Diffstat (limited to 'irc.cpp')
-rw-r--r--irc.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/irc.cpp b/irc.cpp
index 707b4fe19f..f839dc5224 100644
--- a/irc.cpp
+++ b/irc.cpp
@@ -40,7 +40,7 @@ bool DecodeAddress(string str, CAddress& addr)
return false;
memcpy(&tmp, &vch[0], sizeof(tmp));
- addr = CAddress(tmp.ip, tmp.port);
+ addr = CAddress(tmp.ip, tmp.port, NODE_NETWORK);
return true;
}
@@ -163,6 +163,7 @@ void ThreadIRCSeed(void* parg)
int nErrorWait = 10;
int nRetryWait = 10;
+ // IRC server blocks TOR users
if (fUseProxy && addrProxy.port == htons(9050))
return;
@@ -237,14 +238,14 @@ void ThreadIRCSeed(void* parg)
{
// index 7 is limited to 16 characters
// could get full length name at index 10, but would be different from join messages
- strcpy(pszName, vWords[7].c_str());
+ strlcpy(pszName, vWords[7].c_str(), sizeof(pszName));
printf("IRC got who\n");
}
if (vWords[1] == "JOIN" && vWords[0].size() > 1)
{
// :username!username@50000007.F000000B.90000002.IP JOIN :#channelname
- strcpy(pszName, vWords[0].c_str() + 1);
+ strlcpy(pszName, vWords[0].c_str() + 1, sizeof(pszName));
if (strchr(pszName, '!'))
*strchr(pszName, '!') = '\0';
printf("IRC got join\n");