[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: xchat-2002-02-24 snapshot / New plugin interface
On Sat, 2 Mar 2002 22:56:55 +0100
Christoph Hohmann <reboot@gmx.ch> wrote:
> The new interface looks much simpler than the old one, but
> it's still not possible to do some input or output
> preprocessing, to do things like translation, code
> conversion or encryption. I would like to have a hook that
> gets any input or output line and can modify it, and the
> result is then send to the server or processed by x-chat
> like any line that is received from the server.
>
> I tried to write an encryption plugin but just to make the
> decrypted text look like any received text i nearly had to
> copy the hole x-chat privmsg function. The standard print
> function is not good, because it can not open new query
> windows and the output format is probably not the same as
> the user setup.
Well maybe you can suggest a way to do this. I'd rather not
add any new functions, it should be possible to do it with the
current ones. Maybe something like:
xchat_hook_server(ph, " inbound", ..... );
Then passing the new buffer back? *shrug*
> And for the output this is not possible at all, because as
> far as i know, it's only possible to set a hook for
> commands, and not for simple user input. This may be wrong,
> because i have not tested if a non command input triggers
> the /MSG command hook. But if not, a plugin can not process
> the user input before sending.
You can hook non-commands with xchat_hook_command(ph, "", ....);
--
Peter Zelezny. <zed@linux.com>
--
XChat-discuss: mailing list for XChat users
Archive: http://mail.nl.linux.org/xchat-discuss/