Changeset - 52991c925d39
[Not reviewed]
0 1 0
HanzZ - 14 years ago 2011-06-03 13:17:10
hanzz.k@gmail.com
send Connected packet from libircclient-qt backend
1 file changed with 5 insertions and 3 deletions:
0 comments (0 inline, 0 general)
backends/libircclient-qt/session.cpp
Show inline comments
 
@@ -10,27 +10,26 @@
 

	
 
#include "session.h"
 
#include <QtCore>
 
#include <iostream>
 
#include "Swiften/Elements/StatusShow.h"
 

	
 
MyIrcSession::MyIrcSession(const std::string &user, NetworkPlugin *np, QObject* parent) : Irc::Session(parent)
 
{
 
	this->np = np;
 
	this->user = user;
 
}
 

	
 
void MyIrcSession::on_connected()
 
{
 
    std::cout << "connected:\n";
 
void MyIrcSession::on_connected(){
 
	std::cout << "connected:\n";
 
}
 

	
 
void MyIrcSession::on_disconnected()
 
{
 
    std::cout << "disconnected:\n";
 
}
 

	
 
void MyIrcSession::on_bufferAdded(Irc::Buffer* buffer)
 
{
 
    qDebug() << "buffer added:" << buffer->receiver();
 
}
 

	
 
@@ -175,24 +174,27 @@ void MyIrcBuffer::on_ctcpReplyReceived(const QString& origin, const QString& rep
 
             << (flags & Irc::Buffer::IdentifiedFlag ? "(identified!)" : "(not identified)");
 
}
 

	
 
void MyIrcBuffer::on_ctcpActionReceived(const QString& origin, const QString& action, Irc::Buffer::MessageFlags flags)
 
{
 
    qDebug() << "ctcp action received:" << receiver() << origin << action
 
             << (flags & Irc::Buffer::IdentifiedFlag ? "(identified!)" : "(not identified)");
 
}
 

	
 
void MyIrcBuffer::on_numericMessageReceived(const QString& origin, uint code, const QStringList& params)
 
{
 
	switch (code) {
 
		case 251:
 
			np->handleConnected(user);
 
			break;
 
		case 332:
 
			m_topicData = params.value(2).toStdString();
 
			break;
 
		case 333:
 
			np->handleSubject(user, params.value(1).toStdString(), m_topicData, params.value(2).toStdString());
 
			break;
 
		case 353:
 
			QString channel = params.value(2);
 
			QStringList members = params.value(3).split(" ");
 

	
 
			for (int i = 0; i < members.size(); i++) {
 
				int flags = 0;
0 comments (0 inline, 0 general)