Make DCC support opt-in for now
[quassel.git] / src / core / coresessioneventprocessor.cpp
index deca988..f8c5e34 100644 (file)
@@ -28,6 +28,7 @@
 #include "ctcpevent.h"
 #include "ircevent.h"
 #include "ircuser.h"
 #include "ctcpevent.h"
 #include "ircevent.h"
 #include "ircuser.h"
+#include "logger.h"
 #include "messageevent.h"
 #include "netsplit.h"
 #include "quassel.h"
 #include "messageevent.h"
 #include "netsplit.h"
 #include "quassel.h"
@@ -1020,6 +1021,12 @@ void CoreSessionEventProcessor::handleCtcpClientinfo(CtcpEvent *e)
 // http://en.wikipedia.org/wiki/Direct_Client-to-Client
 void CoreSessionEventProcessor::handleCtcpDcc(CtcpEvent *e)
 {
 // http://en.wikipedia.org/wiki/Direct_Client-to-Client
 void CoreSessionEventProcessor::handleCtcpDcc(CtcpEvent *e)
 {
+    // DCC support is unfinished, experimental and potentially dangerous, so make it opt-in
+    if (!Quassel::isOptionSet("enable-experimental-dcc")) {
+        quInfo() << "DCC disabled, start core with --enable-experimental-dcc if you really want to try it out";
+        return;
+    }
+
     // normal:  SEND <filename> <ip> <port> [<filesize>]
     // reverse: SEND <filename> <ip> 0 <filesize> <token>
     QStringList params = e->param().split(' ');
     // normal:  SEND <filename> <ip> <port> [<filesize>]
     // reverse: SEND <filename> <ip> 0 <filesize> <token>
     QStringList params = e->param().split(' ');