From: David Everly <deckrider@gm...>  20050623 03:16:09

On Wed, Jun 22, 2005 at 04:50:55PM 0500, Mark Doliner wrote: > On Tue, 21 Jun 2005 05:55:15 0600, David Everly wrote > > Hello, > >=20 > > I'm working on a plugin whose purpose is to suppress unwanted spam=20 > > bot IMs. Somewhat of a simple pop up blocker. > >=20 > > The user defines a simple question and an answer. When an unknown > > person (not in the buddy or permit lists) sends an IM, it is saved, but > > not displayed and no window pops up. An IM with the question is=20 > > sent to this unknown person, and future IMs from that person are=20 > > ignored until an IM with the correct answer is sent from that=20 > > person. When the correct answer is received, another IM is sent to=20 > > that person indicating that the answer was correct, delivery of the=20 > > first message will proceed and there will be no further impediments=20 > > to conversing. The correct answer is then replaced by the first=20 > > message from the unknown user and the IM is allowed to proceed, > > which opens a conversation and a window for it pops up. > >=20 > > This seems to work with all the prpls (yahoo, irc, etc.). > >=20 > > My problem is that since there is no conversation (because that would > > pop up an IM window) I think I'm forced to use serv_send_im() to > > communicate with the unknown user. This causes problems when using > > gaimotr, because perhaps encryption has engaged, but here is my plugin > > sending unencrypted messages. It has been suggested to use > > gaim_conv_im_send(), but of course this requires a conversation,=20 > > which opens a windowsomewhat defeating to the entire purpose of=20 > > the plugin. > >=20 > > Is there any nice way to fix this in my plugin, while using existing > > gaim1.3.1? > >=20 > > Here is the source, if it would help: > >=20 > > > http://svn.berlios.de/viewcvs/qrc/trunk/botchallenger/botchallenger.c?v= iew=3Dmarkup >=20 > Could you create a conversation if one does not exist, and then always use > gaim_conv_im_send()? Won't that cause an IM window to open? =20 Encrypted Mail Preferred: Key ID: 8527B9AF Key Fingerprint: E1B6 40B6 B73F 695E 0D3B 644E 6427 DD74 8527 B9AF Information: http://www.gnupg.org/ = =20 ASCII ribbon campaign: () against HTML email /\ against Microsoft attachments Information: http://www.expita.com/nomime.html 