Logo Search packages:      
Sourcecode: kmess version File versions  Download package

void NetworkWindow::addIncomingServerMessage ( const QString &  msg  )  [slot]

Logs incoming messages from the server. A shortcut to display an inbound server message, but with the ability to filter separately. Also, any tag-like things are replaced with entities so they can be displayed.

msg Raw message buffer from the connection.

Definition at line 100 of file networkwindow.cpp.

  // Filter if neccessary
    // We're going to have to strip <> tags.
    QString ourMsg= msg;
    ourMsg.replace(QChar('<'), QString("&lt;"));
    ourMsg.replace(QChar('>'), QString("&gt;"));
    ourMsg.prepend(QString("<-- "));

    // Some incoming messages (mime-like for example) have extra \n's
    QChar endch= ourMsg.at(ourMsg.length() - 1);
    while(endch.latin1() == '\n' || endch.latin1() == '\r')
      ourMsg.truncate(ourMsg.length() - 1);
      endch= ourMsg.at(ourMsg.length() - 1);

  } // End if (showIncoming_)

Generated by  Doxygen 1.6.0   Back to index