diff options
author | Johannes Löthberg <johannes@kyriasis.com> | 2018-03-17 13:20:15 +0100 |
---|---|---|
committer | Johannes Löthberg <johannes@kyriasis.com> | 2018-03-17 13:20:15 +0100 |
commit | 3f27cb2124fea90248493d32b3ecb0cc9d9b07aa (patch) | |
tree | fb8f519c2b992dc7e760854c17715f9ce29b9fdd /weechat/python/infolist.py | |
parent | a3c3b9a4b6e2dd292e665d9b63d4f782a5798a8d (diff) | |
download | dotfiles-3f27cb2124fea90248493d32b3ecb0cc9d9b07aa.tar.xz |
weechat: Update plugins
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
Diffstat (limited to 'weechat/python/infolist.py')
-rw-r--r-- | weechat/python/infolist.py | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/weechat/python/infolist.py b/weechat/python/infolist.py index 471f63c..5c57ecd 100644 --- a/weechat/python/infolist.py +++ b/weechat/python/infolist.py @@ -18,6 +18,8 @@ # Display infolist in a buffer. # # History: +# 2017-10-22, nils_2 <freenode.#weechat>: +# version 0.6: add string_eval_expression() # 2012-10-02, nils_2 <freenode.#weechat>: # version 0.5: switch to infolist buffer (if exists) when command /infolist # is called with arguments, add some examples to help page @@ -35,7 +37,7 @@ SCRIPT_NAME = "infolist" SCRIPT_AUTHOR = "Sebastien Helleu <flashcode@flashtux.org>" -SCRIPT_VERSION = "0.5" +SCRIPT_VERSION = "0.6" SCRIPT_LICENSE = "GPL3" SCRIPT_DESC = "Display infolist in a buffer" @@ -165,6 +167,8 @@ def infolist_buffer_new(): def infolist_cmd(data, buffer, args): global infolist_buffer + args = string_eval_expression(args) + if infolist_buffer == "": infolist_buffer_new() if infolist_buffer != "" and args != "": @@ -173,6 +177,9 @@ def infolist_cmd(data, buffer, args): return weechat.WEECHAT_RC_OK +def string_eval_expression(string): + return weechat.string_eval_expression(string,{},{},{}) + if __name__ == "__main__" and import_ok: if weechat.register(SCRIPT_NAME, SCRIPT_AUTHOR, SCRIPT_VERSION, SCRIPT_LICENSE, SCRIPT_DESC, "", ""): @@ -190,6 +197,8 @@ if __name__ == "__main__" and import_ok: " Show information about nick \"FlashCode\" in channel \"#weechat\" on server \"freenode\":\n" " /infolist irc_nick freenode,#weechat,FlashCode\n" " Show nicklist from a specific buffer:\n" - " /infolist nicklist <buffer pointer>" + " /infolist nicklist <buffer pointer>\n" + " Show current buffer:\n" + " /infolist buffer ${buffer}" "", "%(infolists)", "infolist_cmd", "") |