Hello Dear,
I have writing antispam plugin for Kopete and have some questions)
1. When receive a new message, how to understand, is user anonymous or already
in my contact list?
2. How to drop message if i detect a spam. i only have the Kopete::Message &msg
reference.
----- Begin spamfilterplugin.cpp --------------------------------
void SpamFilterPlugin::slotAboutToSend( Kopete::Message &msg )
{
if ( ( msg.direction() == Kopete::Message::Inbound ) )
{
bool Spam = false;
// Check spam
//
if ( Spam )
{
const Contact *from = msg.from();
Account *ac = from->account();
ac->block(ac->accountId());
// deleting message
//delete msg;
}
}
}
------------ EOF------------------------------
_______________________________________________
kopete-devel mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/kopete-devel