check for qca provider plugin, fixes #1045
[quassel.git] / src / core / coreuserinputhandler.cpp
index c0c4036..633cd8b 100644 (file)
@@ -163,6 +163,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())
@@ -452,6 +455,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())
@@ -636,6 +642,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_;