diff options
Diffstat (limited to 'src/gui/connectionWindow.cpp')
| -rw-r--r-- | src/gui/connectionWindow.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/gui/connectionWindow.cpp b/src/gui/connectionWindow.cpp index cf51051..df31562 100644 --- a/src/gui/connectionWindow.cpp +++ b/src/gui/connectionWindow.cpp @@ -472,6 +472,35 @@ void ConnectionWindow::messageStation(QString ident, QString message, pvsCon->sendMessage(PVSMESSAGE, ident, message); } +/* + * to send COMMAND instead of PVSMESSaGE + */ +bool ConnectionWindow::commandStations(QString ident, QString message) { + if (std::list<QString>* messageList = MainWindow::getConnectionList()->getSelectedClients()) { + if (!messageList->empty()) { + for (std::list<QString>::iterator tmpIt = messageList->begin(); tmpIt + != messageList->end(); tmpIt++) { + PVSClient + * tmpConnection = + PVSConnectionManager::getManager()->getClientFromIp( + (*tmpIt).toUtf8().data()); + // we don't want to lock the dozent machine + if (tmpConnection && tmpConnection->getConnectionFrame()->getFrame() && + !tmpConnection->getConnectionFrame()->getFrame()->isDozent()) + { + //messageStation(ident, message, tmpConnection); + tmpConnection->sendMessage(PVSCOMMAND, ident, message); + } else { + // scream in agony + } + } + } + delete messageList; + } + return true; +} + + bool ConnectionWindow::lockStationsWithMessage(QString message) { if (!hasDozent) |
