author | skyhusker <skyhusker> | 2005-02-03 21:47:50 (UTC) |
---|---|---|
committer | skyhusker <skyhusker> | 2005-02-03 21:47:50 (UTC) |
commit | 8aaae9e3eca7853e9c693d2401f721d75209acf7 (patch) (unidiff) | |
tree | 6f700d154fac8510b322242496604d0ad7589377 /noncore/net/opieirc/ircsession.cpp | |
parent | 875b3b63624308f4e50f82e17db27edeb9609d6c (diff) | |
download | opie-8aaae9e3eca7853e9c693d2401f721d75209acf7.zip opie-8aaae9e3eca7853e9c693d2401f721d75209acf7.tar.gz opie-8aaae9e3eca7853e9c693d2401f721d75209acf7.tar.bz2 |
Added DCC receive support
Diffstat (limited to 'noncore/net/opieirc/ircsession.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/opieirc/ircsession.cpp | 5 |
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,59 +1,60 @@ | |||
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 | ||
7 | IRCSession::IRCSession(QWidget *parent, IRCServer *server) { | 7 | IRCSession::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 | ||
17 | IRCSession::~IRCSession() { | 18 | IRCSession::~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 | ||
26 | void IRCSession::beginSession() { | 27 | void IRCSession::beginSession() { |
27 | m_connection->doConnect(); | 28 | m_connection->doConnect(); |
28 | } | 29 | } |
29 | 30 | ||
30 | void IRCSession::join(QString channelname) { | 31 | void IRCSession::join(QString channelname) { |
31 | m_connection->sendLine("JOIN " + channelname); | 32 | m_connection->sendLine("JOIN " + channelname); |
32 | } | 33 | } |
33 | 34 | ||
34 | void IRCSession::quit(){ | 35 | void 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"); |
36 | } | 37 | } |
37 | 38 | ||
38 | void IRCSession::quit(QString message){ | 39 | void IRCSession::quit(QString message){ |
39 | m_connection->sendLine("QUIT :" + message); | 40 | m_connection->sendLine("QUIT :" + message); |
40 | } | 41 | } |
41 | 42 | ||
42 | void IRCSession::topic(IRCChannel *channel, QString message){ | 43 | void IRCSession::topic(IRCChannel *channel, QString message){ |
43 | m_connection->sendLine("TOPIC :" + channel->channelname() + " " + message); | 44 | m_connection->sendLine("TOPIC :" + channel->channelname() + " " + message); |
44 | } | 45 | } |
45 | 46 | ||
46 | void IRCSession::mode(IRCChannel *channel, QString message){ | 47 | void IRCSession::mode(IRCChannel *channel, QString message){ |
47 | m_connection->sendLine("MODE " + channel->channelname() + " " + message); | 48 | m_connection->sendLine("MODE " + channel->channelname() + " " + message); |
48 | } | 49 | } |
49 | 50 | ||
50 | void IRCSession::mode(IRCPerson *person, QString message){ | 51 | void IRCSession::mode(IRCPerson *person, QString message){ |
51 | m_connection->sendLine("MODE " + person->nick() + " " + message); | 52 | m_connection->sendLine("MODE " + person->nick() + " " + message); |
52 | } | 53 | } |
53 | 54 | ||
54 | void IRCSession::mode(QString message){ | 55 | void IRCSession::mode(QString message){ |
55 | m_connection->sendLine("MODE " + message); | 56 | m_connection->sendLine("MODE " + message); |
56 | } | 57 | } |
57 | 58 | ||
58 | void IRCSession::raw(QString message){ | 59 | void IRCSession::raw(QString message){ |
59 | m_connection->sendLine(message); | 60 | m_connection->sendLine(message); |