weechat-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Weechat-support] Get result of weechat.command from script


From: FlashCode
Subject: Re: [Weechat-support] Get result of weechat.command from script
Date: Wed, 20 Mar 2013 22:57:45 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

On Wed, Mar 20, 2013 at 04:45:36PM +0400, Alexander Skurihin wrote:
>    Hello,
>    I want to create a weechat plugin. And I need to get realname of people in 
> nicklist
>    I know, that I can get what I want by parsing weechat.command('/who 
> username')
>    but that not as easy as I expect it to be.
>    So, are there any others ways to get realname or in general to get the 
> result of weechat command.

> _______________________________________________
> Weechat-support mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/weechat-support

Hi Alexander,

You must use the "redirection" feature to catch output of an IRC command. This
is asynchronous and result is sent to a callback (because IRC server may not
reply immediately).

See the API doc for more info and an example (in C and Python):
http://weechat.org/files/doc/devel/weechat_plugin_api.en.html#hsignal_irc_redirect_command

To get the real name of someone on IRC, you must use this redirection, there is
no other way to proceed.

You can not catch (directly) output of commands (other than this redirection,
which is specific to an IRC command).

-- 
Cordialement / Best regards
Sébastien.

web: flashtux.org / weechat.org      mail: address@hidden
irc: FlashCode @ irc.freenode.net    xmpp: address@hidden

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]