WeeChat DevCenter

Data for callbacks in script API

Major changes were done in script API: data string was added to all callbacks. C plugin API is already ok (there is data pointer for callbacks).
Therefore, all scripts for development version are incompatible with this new version. All official scripts have been updated on plugins page.

This data string must be added after each callback function in arguments of functions. For example in python :

weechat.hook_command("go", "Quick jump to buffers", "", "", "", "go_cmd")
(...)
def go_cmd(buffer, args):

becomes:

weechat.hook_command("go", "Quick jump to buffers", "", "", "", "go_cmd", "")
(...)
def go_cmd(data, buffer, args):

Comments

1. On Friday, May 8 2009, 12:49 by MySelf

Hi,

it's not the right place here but the latest dev-version of weechat-dev don't work for me. When i press F9 or F10 to see the topic wheechat-dev eats 98% of my cpu. So i have to kill it.
mpdnp.py, shell.py and tinyurl.py give errors. :/
Hope that can/will be fixed because weechat is the best.

Regards

2. On Friday, May 8 2009, 12:55 by FlashCode

For scripts, just update them to last version, API has changed, so all scripts have been updated.
For cpu usage problem, please join us on irc.freenode.net #weechat and tell me how to reproduce it. Or you can open bug on savannah bug tracker.
Thank you!

3. On Friday, May 8 2009, 13:47 by FlashCode

I just fixed problem with infinite loop when scrolling bars.

4. On Friday, May 8 2009, 13:52 by MySelf

Fine,

i will update soon.

Thanks