X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fircparser.cpp;h=25d16f81d511909a3c60693e4ca271e94ec20a32;hp=871816dd2ad7b6729815892b70f8882e5e22f793;hb=dce2be6d7f9af7dcc0133ee7f0f42e9ef47be568;hpb=48dda5f3e963e13e36300ddaef262660bf169672 diff --git a/src/core/ircparser.cpp b/src/core/ircparser.cpp index 871816dd..25d16f81 100644 --- a/src/core/ircparser.cpp +++ b/src/core/ircparser.cpp @@ -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;