summaryrefslogtreecommitdiff
path: root/noncore/net/opieirc/ircsession.cpp
Unidiff
Diffstat (limited to 'noncore/net/opieirc/ircsession.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opieirc/ircsession.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/net/opieirc/ircsession.cpp b/noncore/net/opieirc/ircsession.cpp
index 6404d71..3b176d0 100644
--- a/noncore/net/opieirc/ircsession.cpp
+++ b/noncore/net/opieirc/ircsession.cpp
@@ -1,57 +1,57 @@
1#include "ircsession.h" 1#include "ircsession.h"
2#include "ircmessageparser.h" 2#include "ircmessageparser.h"
3#include "ircversion.h" 3#include "ircversion.h"
4 4
5IRCSession::IRCSession(IRCServer *server) { 5IRCSession::IRCSession(IRCServer *server) {
6 m_server = server; 6 m_server = server;
7 m_connection = new IRCConnection(m_server); 7 m_connection = new IRCConnection(m_server);
8 m_parser = new IRCMessageParser(this); 8 m_parser = new IRCMessageParser(this);
9 connect(m_connection, SIGNAL(messageArrived(IRCMessage *)), this, SLOT(handleMessage(IRCMessage *))); 9 connect(m_connection, SIGNAL(messageArrived(IRCMessage*)), this, SLOT(handleMessage(IRCMessage*)));
10 connect(m_parser, SIGNAL(outputReady(IRCOutput)), this, SIGNAL(outputReady(IRCOutput))); 10 connect(m_parser, SIGNAL(outputReady(IRCOutput)), this, SIGNAL(outputReady(IRCOutput)));
11 connect(m_connection, SIGNAL(outputReady(IRCOutput)), this, SIGNAL(outputReady(IRCOutput))); 11 connect(m_connection, SIGNAL(outputReady(IRCOutput)), this, SIGNAL(outputReady(IRCOutput)));
12} 12}
13 13
14IRCSession::~IRCSession() { 14IRCSession::~IRCSession() {
15 /* We want this to get deleted automatically */ 15 /* We want this to get deleted automatically */
16 m_channels.setAutoDelete(TRUE); 16 m_channels.setAutoDelete(TRUE);
17 m_people.setAutoDelete(TRUE); 17 m_people.setAutoDelete(TRUE);
18 18
19 delete m_parser; 19 delete m_parser;
20 delete m_connection; 20 delete m_connection;
21} 21}
22 22
23void IRCSession::beginSession() { 23void IRCSession::beginSession() {
24 m_connection->doConnect(); 24 m_connection->doConnect();
25} 25}
26 26
27void IRCSession::join(QString channelname) { 27void IRCSession::join(QString channelname) {
28 m_connection->sendLine("JOIN "+channelname); 28 m_connection->sendLine("JOIN "+channelname);
29} 29}
30 30
31void IRCSession::quit(){ 31void IRCSession::quit(){
32 m_connection->sendLine("QUIT :[OI] I'm too good to need a reason"); 32 m_connection->sendLine("QUIT :[OI] I'm too good to need a reason");
33} 33}
34 34
35void IRCSession::quit(QString message){ 35void IRCSession::quit(QString message){
36 m_connection->sendLine("QUIT :" + message); 36 m_connection->sendLine("QUIT :" + message);
37} 37}
38 38
39void IRCSession::topic(IRCChannel *channel, QString message){ 39void IRCSession::topic(IRCChannel *channel, QString message){
40 m_connection->sendLine("TOPIC :" + channel->channelname() + " " + message); 40 m_connection->sendLine("TOPIC :" + channel->channelname() + " " + message);
41} 41}
42 42
43void IRCSession::mode(IRCChannel *channel, QString message){ 43void IRCSession::mode(IRCChannel *channel, QString message){
44 m_connection->sendLine("MODE " + channel->channelname() + " " + message); 44 m_connection->sendLine("MODE " + channel->channelname() + " " + message);
45} 45}
46 46
47void IRCSession::mode(IRCPerson *person, QString message){ 47void IRCSession::mode(IRCPerson *person, QString message){
48 m_connection->sendLine("MODE " + person->nick() + " " + message); 48 m_connection->sendLine("MODE " + person->nick() + " " + message);
49} 49}
50 50
51void IRCSession::mode(QString message){ 51void IRCSession::mode(QString message){
52 m_connection->sendLine("MODE " + message); 52 m_connection->sendLine("MODE " + message);
53} 53}
54 54
55void IRCSession::raw(QString message){ 55void IRCSession::raw(QString message){
56 m_connection->sendLine(message); 56 m_connection->sendLine(message);
57} 57}