Great idea, but it's mostly already done. The Privacy plugin blocks messages 
from people not on the user's buddy list. Additional filtering, perhaps by 
content, would be cool, but I think you should add it to the Privacy plugin.

--
~Charles Connell


-------------- Original message -------------- 
From: NOne None <[EMAIL PROTECTED]> 

> 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 
_______________________________________________
kopete-devel mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/kopete-devel

Reply via email to