QTfrontend/newnetclient.cpp
changeset 4973 53411a26df7e
parent 4963 59c2489afcbd
child 4976 088d40d8aba2
--- a/QTfrontend/newnetclient.cpp	Sun Feb 27 18:55:34 2011 -0500
+++ b/QTfrontend/newnetclient.cpp	Mon Feb 28 22:04:10 2011 +0300
@@ -240,6 +240,12 @@
     }
 
     if (lst[0] == "CONNECTED") {
+        if(lst.size() < 3 || lst[2].toInt() < cMinServerVersion)
+        {
+            // TODO: Warn user, disconnect
+            qWarning() << "Server too old";
+        }
+
         RawSendNet(QString("NICK%1%2").arg(delimeter).arg(mynick));
         RawSendNet(QString("PROTO%1%2").arg(delimeter).arg(*cProtoVer));
         netClientState = 1;