Improve weechat script