X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fcore%2Fcoresessioneventprocessor.cpp;h=9a00537ec5bd2b22360e56891d46f1493b679512;hb=13c1c8fd092079ff9bc4ff3acfa9100d008d5ea7;hp=844155b06612ede35b6f5cffcb704df993c5018b;hpb=7768b765b21279eadef1400c6c614c63a3db8ed8;p=quassel.git diff --git a/src/core/coresessioneventprocessor.cpp b/src/core/coresessioneventprocessor.cpp index 844155b0..9a00537e 100644 --- a/src/core/coresessioneventprocessor.cpp +++ b/src/core/coresessioneventprocessor.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2013 by the Quassel Project * + * Copyright (C) 2005-2014 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -23,14 +23,15 @@ #include "coreirclisthelper.h" #include "corenetwork.h" #include "coresession.h" +#include "coretransfer.h" #include "coretransfermanager.h" #include "ctcpevent.h" #include "ircevent.h" #include "ircuser.h" +#include "logger.h" #include "messageevent.h" #include "netsplit.h" #include "quassel.h" -#include "transfer.h" #ifdef HAVE_QCA2 # include "keyevent.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(' '); @@ -1059,7 +1066,7 @@ void CoreSessionEventProcessor::handleCtcpDcc(CtcpEvent *e) } // TODO: check if target is the right thing to use for the partner - Transfer *transfer = new Transfer(Transfer::Receive, e->target(), filename, address, port, size, this); + CoreTransfer *transfer = new CoreTransfer(Transfer::Receive, e->target(), filename, address, port, size, this); coreSession()->signalProxy()->synchronize(transfer); coreSession()->transferManager()->addTransfer(transfer); }