X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fcore%2Fircparser.cpp;h=25d16f81d511909a3c60693e4ca271e94ec20a32;hb=cdc6091a2e02b84a48937cda287a0769ceb8726a;hp=bb77ad1cbb4bb803cc14b3cbcf75835b1d710c41;hpb=fa2e185ecffa83feca93577a2f8348d554e61f96;p=quassel.git diff --git a/src/core/ircparser.cpp b/src/core/ircparser.cpp index bb77ad1c..25d16f81 100644 --- a/src/core/ircparser.cpp +++ b/src/core/ircparser.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2016 by the Quassel Project * + * Copyright (C) 2005-2018 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -20,6 +20,8 @@ #include "ircparser.h" +#include + #include "corenetwork.h" #include "eventmanager.h" #include "ircevent.h" @@ -35,6 +37,10 @@ IrcParser::IrcParser(CoreSession *session) : QObject(session), _coreSession(session) { + // Check if raw IRC logging is enabled + _debugLogRawIrc = (Quassel::isOptionSet("debug-irc") || Quassel::isOptionSet("debug-irc-id")); + _debugLogRawNetId = Quassel::optionValue("debug-irc-id").toInt(); + connect(this, SIGNAL(newEvent(Event *)), coreSession()->eventManager(), SLOT(postEvent(Event *))); } @@ -91,6 +97,13 @@ void IrcParser::processNetworkIncoming(NetworkDataEvent *e) return; } + // Log the message if enabled and network ID matches or allows all + if (_debugLogRawIrc + && (_debugLogRawNetId == -1 || net->networkId().toInt() == _debugLogRawNetId)) { + // Include network ID + qDebug() << "IRC net" << net->networkId() << "<<" << msg; + } + // Now we split the raw message into its various parts... QString prefix; QByteArray trailing;