/***************************************************************************
- * 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 *
#include "ircparser.h"
+#include <QDebug>
+
#include "corenetwork.h"
#include "eventmanager.h"
#include "ircevent.h"
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 *)));
}
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;