X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fcore%2Fcoreauthhandler.cpp;h=36eecc195ca29d122936283a33b8613c2d9808c7;hb=0cb82cb25018f33b13d356fc03528d9eea76e568;hp=e277fcb3413503443517a786537a1c88aa9cc863;hpb=d1bf207d30fe62a15d0e8669d186374c68e6eae8;p=quassel.git diff --git a/src/core/coreauthhandler.cpp b/src/core/coreauthhandler.cpp index e277fcb3..36eecc19 100644 --- a/src/core/coreauthhandler.cpp +++ b/src/core/coreauthhandler.cpp @@ -27,8 +27,6 @@ #include "core.h" #include "logger.h" -#include "protocols/legacy/legacypeer.h" - using namespace Protocol; CoreAuthHandler::CoreAuthHandler(QTcpSocket *socket, QObject *parent) @@ -65,7 +63,7 @@ void CoreAuthHandler::onReadyRead() // no magic, assume legacy protocol qDebug() << "Legacy client detected, switching to compatibility mode"; _legacy = true; - RemotePeer *peer = new LegacyPeer(this, socket(), this); + RemotePeer *peer = PeerFactory::createPeer(PeerFactory::ProtoDescriptor(Protocol::LegacyProtocol, 0), this, socket(), this); connect(peer, SIGNAL(protocolVersionMismatch(int,int)), SLOT(onProtocolVersionMismatch(int,int))); setPeer(peer); return; @@ -116,6 +114,8 @@ void CoreAuthHandler::onReadyRead() void CoreAuthHandler::setPeer(RemotePeer *peer) { + qDebug().nospace() << "Using " << qPrintable(peer->protocolName()) << "..."; + _peer = peer; disconnect(socket(), SIGNAL(readyRead()), this, SLOT(onReadyRead())); }