patrick08:

Ok, so I used your code:
Qt Code:
  1. void QtBotCore::connected()
  2. {
  3. QTextStream *t = new QTextStream( tcpSocket );
  4. QString response;
  5. int loops = -1;
  6. while ( !t->atEnd() )
  7. {
  8. loops++;
  9. response = t->readLine();
  10. qDebug() << loops << " line " << response;
  11.  
  12. if ( response.contains(":VERSION") )
  13. qDebug() << "IT WORKED !";
  14. }
  15. }
To copy to clipboard, switch view to plain text mode 

And the output is something like this:
0 line "127.0.0.1 372 nmuntz :- ____ _____ _______ ____ ____ _"
1 line ":127.0.0.1 372 nmuntz :- | _ \ / _ \ \ / / ____| _ \/ ___| ___| |"
2 line ":127.0.0.1 372 nmuntz :- Welcome to Server"
3 line ":127.0.0.1 372 nmuntz :- "
4 line ":127.0.0.1 376 nmuntz :End of /MOTD command."
5 line ":nmuntz MODE nmuntz :+iw"
6 line ":Global!services@powers.cl NOTICE nmuntz :[Logon News - May 03 2006] PWN!"
7 line ":nmuntz@pool.verizon.net PRIVMSG nmuntz :VERSION"