[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: XCHAT_EAT_ALL doesn't work on "Your Message" event
On Wed, 02 Apr 2003 13:08:27 +0300
Gediminas Aleknavicius <gediminas@delfi.lt> wrote:
> Hello,
>
> We are doing some serious C plugin coding here trying to do some message
> text processing before the message is sent. The hook
> hook1 = xchat_hook_print(ph, "Your Message", XCHAT_PRI_NORM,
> your_message_cb, (void*)"Your Message" );
> works fine and the function your_message_cb() is called, but returning
> XCHAT_EAT_ALL does not prevent from message being sent. Is this a bug of
> XChat? Or is this the way it should work? If yes then is there any other
> way to catch the message user is trying to send and stop it from being sent?
No, it shouldn't display the print event if you return EAT_ALL. Looking at the
code, it looks correct, are you sure everything's ok in your plugin?
common/text.c:
if (plugin_emit_print (sess, word))
return;
if (te[index].sound)
fe_play_wave (te[index].sound);
display_event (pntevts[index], sess, te[index].num_args, word);
}
--
Peter Zelezny.
--
XChat-discuss: mailing list for XChat users
Archive: http://mail.nl.linux.org/xchat-discuss/