summaryrefslogtreecommitdiff
path: root/noncore/net/opieirc/ircsession.cpp
Unidiff
Diffstat (limited to 'noncore/net/opieirc/ircsession.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/opieirc/ircsession.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/noncore/net/opieirc/ircsession.cpp b/noncore/net/opieirc/ircsession.cpp
index fd8ba72..c8d7869 100644
--- a/noncore/net/opieirc/ircsession.cpp
+++ b/noncore/net/opieirc/ircsession.cpp
@@ -1,35 +1,36 @@
1 1
2#include "ircsession.h" 2#include "ircsession.h"
3#include "ircmessageparser.h" 3#include "ircmessageparser.h"
4#include "ircchannelperson.h" 4#include "ircchannelperson.h"
5#include "ircversion.h" 5#include "ircversion.h"
6 6
7IRCSession::IRCSession(QWidget *parent, IRCServer *server) { 7IRCSession::IRCSession(QObject *parent, IRCServer *server)
8 : QObject(parent)
9{
8 m_server = server; 10 m_server = server;
9 m_connection = new IRCConnection(m_server); 11 m_connection = new IRCConnection(m_server);
10 m_parser = new IRCMessageParser(this); 12 m_parser = new IRCMessageParser(this);
11 m_parent = parent;
12 connect(m_connection, SIGNAL(messageArrived(IRCMessage*)), this, SLOT(handleMessage(IRCMessage*))); 13 connect(m_connection, SIGNAL(messageArrived(IRCMessage*)), this, SLOT(handleMessage(IRCMessage*)));
13 connect(m_parser, SIGNAL(outputReady(IRCOutput)), this, SIGNAL(outputReady(IRCOutput))); 14 connect(m_parser, SIGNAL(outputReady(IRCOutput)), this, SIGNAL(outputReady(IRCOutput)));
14 connect(m_connection, SIGNAL(outputReady(IRCOutput)), this, SIGNAL(outputReady(IRCOutput))); 15 connect(m_connection, SIGNAL(outputReady(IRCOutput)), this, SIGNAL(outputReady(IRCOutput)));
15} 16}
16 17
17IRCSession::~IRCSession() { 18IRCSession::~IRCSession() {
18 /* We want this to get deleted automatically */ 19 /* We want this to get deleted automatically */
19 m_channels.setAutoDelete(TRUE); 20 m_channels.setAutoDelete(TRUE);
20 m_people.setAutoDelete(TRUE); 21 m_people.setAutoDelete(TRUE);
21 22
22 delete m_parser; 23 delete m_parser;
23 delete m_connection; 24 delete m_connection;
24} 25}
25 26
26void IRCSession::beginSession() { 27void IRCSession::beginSession() {
27 m_connection->doConnect(); 28 m_connection->doConnect();
28} 29}
29 30
30void IRCSession::join(QString channelname) { 31void IRCSession::join(QString channelname) {
31 m_connection->sendLine("JOIN " + channelname); 32 m_connection->sendLine("JOIN " + channelname);
32} 33}
33 34
34void IRCSession::quit(){ 35void IRCSession::quit(){
35 m_connection->sendLine("QUIT :[OI] I'm too good to need a reason"); 36 m_connection->sendLine("QUIT :[OI] I'm too good to need a reason");