QTfrontend/newnetclient.cpp
changeset 391 e7565bb852a2
parent 383 09a8795105a4
child 395 641ed71c7c93
equal deleted inserted replaced
390:dca6bd77d71d 391:e7565bb852a2
    85 }
    85 }
    86 
    86 
    87 void HWNewNet::SendNet(const QByteArray & buf)
    87 void HWNewNet::SendNet(const QByteArray & buf)
    88 {
    88 {
    89   QString msg = QString(buf.toBase64());
    89   QString msg = QString(buf.toBase64());
    90   qDebug() << "to net:" << buf << ":" << msg;
       
    91 
    90 
    92   if(msg == "AUM=") {
    91   if(msg == "AUM=") {
    93     SendConfigToEngine();
    92     SendConfigToEngine();
    94     return ;
    93     return ;
    95   }
    94   }
   149 
   148 
   150 void HWNewNet::ParseLine(const QByteArray & line)
   149 void HWNewNet::ParseLine(const QByteArray & line)
   151 {
   150 {
   152   QString msg = QString::fromUtf8 (line.data(), line.size());
   151   QString msg = QString::fromUtf8 (line.data(), line.size());
   153 
   152 
   154   qDebug() << "line " << msg << " received";
       
   155 
       
   156   QStringList lst = msg.split(delimeter);
   153   QStringList lst = msg.split(delimeter);
   157   if (lst[0] == "ERRONEUSNICKNAME") {
   154   if (lst[0] == "ERRONEUSNICKNAME") {
   158     QMessageBox::information(0, 0, "Your net nickname is in use or cannot be used");
   155     QMessageBox::information(0, 0, "Your net nickname is in use or cannot be used");
   159     return;
   156     return;
   160   }
   157   }