changeset 147:1bf4f0e9e04c draft

misc
author s_nakamoto <s_nakamoto@1a98c847-1fd6-4fd8-948a-caf3550aa51b>
date Fri, 05 Mar 2010 02:55:09 +0000
parents c20f78d1b4bd
children 48fda46fed2b
files irc.cpp
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/irc.cpp
+++ b/irc.cpp
@@ -76,6 +76,8 @@
             if (c == '\r')
                 return true;
             strLine += c;
+            if (strLine.size() >= 9000)
+                return true;
         }
         else if (nBytes <= 0)
         {
@@ -109,7 +111,7 @@
                 return false;
             vector<string> vWords;
             ParseString(strLine, ' ', vWords);
-            if (vWords[0] == "PING")
+            if (vWords.size() >= 1 && vWords[0] == "PING")
             {
                 strLine[1] = 'O';
                 strLine += '\r';
@@ -156,6 +158,7 @@
 
 void ThreadIRCSeed(void* parg)
 {
+    printf("ThreadIRCSeed started\n");
     SetThreadPriority(THREAD_PRIORITY_NORMAL);
     int nErrorWait = 10;
     int nRetryWait = 10;