check for qca provider plugin, fixes #1045
[quassel.git] / src / core / coreuserinputhandler.cpp
index 8292325..f1654a4 100644 (file)
@@ -164,6 +164,9 @@ void CoreUserInputHandler::handleDelkey(const BufferInfo &bufferInfo, const QStr
   if(!bufferInfo.isValid())
     return;
 
+  if(!Cipher::neededFeaturesAvailable())
+    return;
+
   QStringList parms = msg.split(' ', QString::SkipEmptyParts);
 
   if(parms.isEmpty() && !bufferInfo.bufferName().isEmpty())
@@ -454,6 +457,9 @@ void CoreUserInputHandler::handleSetkey(const BufferInfo &bufferInfo, const QStr
   if(!bufferInfo.isValid())
     return;
 
+  if(!Cipher::neededFeaturesAvailable())
+    return;
+
   QStringList parms = msg.split(' ', QString::SkipEmptyParts);
 
   if(parms.count() == 1 && !bufferInfo.bufferName().isEmpty())
@@ -638,6 +644,9 @@ QByteArray CoreUserInputHandler::encrypt(const QString &target, const QByteArray
   if(message_.isEmpty())
     return message_;
 
+  if(!Cipher::neededFeaturesAvailable())
+    return message_;
+
   Cipher *cipher = network()->cipher(target);
   if(!cipher)
     return message_;