Commit two patches to kdenetwork from Slávek Banko:

1.) fix problem with html special chars (especially &) in messages from nowlistening plugin in kopete. Kopete::Message::RichText expects already escaped chars, but messages from nowlistening is plain text. With Kopete::Message::PlainText is message valid
2.) add pongserver, that add xep-0199 responses to kopete


git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1251584 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru
tpearson 13 years ago
parent 39f99c18f8
commit 6f832f8441

@ -177,7 +177,7 @@ void NowListeningPlugin::slotMediaCommand( const TQString &args, Kopete::ChatSes
theChat->members(),
advert + " " + args,
Kopete::Message::Outbound,
Kopete::Message::RichText
Kopete::Message::PlainText
);
theChat->sendMessage( msg );

@ -223,6 +223,7 @@ void Client::start(const TQString &host, const TQString &user, const TQString &p
connect(pr, TQT_SIGNAL(roster(const Roster &)), TQT_SLOT(prRoster(const Roster &)));
new JT_ServInfo(rootTask());
new PongServer(rootTask());
d->active = true;
}
@ -1520,3 +1521,35 @@ LiveRoster::ConstIterator LiveRoster::find(const Jid &j, bool compareRes) const
}
}
//----------------------------------------------------------------------------
// PongServer
//----------------------------------------------------------------------------
/**
* \class PongServer
* \brief Answers XMPP Pings
*/
PongServer::PongServer(Task *parent)
:Task(parent)
{
}
PongServer::~PongServer()
{
}
bool PongServer::take(const TQDomElement &e)
{
if (e.tagName() != "iq" || e.attribute("type") != "get")
return false;
bool found = false;
TQDomElement ping = findSubTag(e, "ping", &found);
if (found && ping.attribute("xmlns") == "urn:xmpp:ping") {
TQDomElement iq = createIQ(doc(), "result", e.attribute("from"), e.attribute("id"));
send(iq);
return true;
}
return false;
}

@ -445,7 +445,7 @@ namespace XMPP
class JT_DiscoPublish : public Task
{
Q_OBJECT
TQ_OBJECT
TQ_OBJECT
public:
JT_DiscoPublish(Task *);
~JT_DiscoPublish();
@ -463,7 +463,7 @@ namespace XMPP
class JT_MucPresence : public Task
{
Q_OBJECT
TQ_OBJECT
TQ_OBJECT
public:
JT_MucPresence(Task *parent);
~JT_MucPresence();
@ -484,7 +484,7 @@ namespace XMPP
class JT_PrivateStorage : public Task
{
Q_OBJECT
TQ_OBJECT
TQ_OBJECT
public:
JT_PrivateStorage(Task *parent);
~JT_PrivateStorage();
@ -502,6 +502,18 @@ namespace XMPP
Private *d;
};
class PongServer : public Task
{
Q_OBJECT
TQ_OBJECT
public:
PongServer(Task *);
~PongServer();
bool take(const TQDomElement &);
};
}
#endif

Loading…
Cancel
Save