From: Manuel Nickschas Date: Wed, 1 Jan 2014 22:11:03 +0000 (+0100) Subject: Make DCC support opt-in for now X-Git-Tag: 0.10-beta1~57 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=91a0c4e08ea7da4264245de2b41f40f11846c2c4 Make DCC support opt-in for now As support for DCC is unfinished, untested and potentially dangerous (i.e. one could spam your desktop with millions of dialog boxes), disable it by default. People really wanting to play around with this may start the core with --enable-experimental-dcc, but you have been warned. --- diff --git a/src/common/main.cpp b/src/common/main.cpp index ced7d5bd..8ed40da4 100644 --- a/src/common/main.cpp +++ b/src/common/main.cpp @@ -118,6 +118,7 @@ int main(int argc, char **argv) #ifdef HAVE_SSL cliParser->addSwitch("require-ssl", 0, "Require SSL for client connections"); #endif + cliParser->addSwitch("enable-experimental-dcc", 0, "Enable highly experimental and unfinished support for CTCP DCC (DANGEROUS)"); #endif #ifdef HAVE_KDE diff --git a/src/core/coresessioneventprocessor.cpp b/src/core/coresessioneventprocessor.cpp index deca9880..f8c5e344 100644 --- a/src/core/coresessioneventprocessor.cpp +++ b/src/core/coresessioneventprocessor.cpp @@ -28,6 +28,7 @@ #include "ctcpevent.h" #include "ircevent.h" #include "ircuser.h" +#include "logger.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) { + // 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 [] // reverse: SEND 0 QStringList params = e->param().split(' ');