GithubHelp home page GithubHelp logo

weechat / scripts Goto Github PK

View Code? Open in Web Editor NEW
230.0 25.0 220.0 3.73 MB

Official scripts for WeeChat.

Home Page: https://weechat.org/scripts/

Scheme 0.48% Lua 3.61% Perl 26.56% Python 65.13% Ruby 2.81% Tcl 0.55% Prolog 0.07% JavaScript 0.12% Raku 0.65% Makefile 0.02%
weechat scripts python perl ruby lua tcl scheme javascript

scripts's Introduction

WeeChat

WeeChat

Mastodon Diaspora* X Devel blog Slant Donate

CI Code coverage

WeeChat (Wee Enhanced Environment for Chat) is a free chat client, fast and light, designed for many operating systems.
It is highly customizable and extensible with scripts.

Homepage: https://weechat.org/

Features

  • Modular chat client: WeeChat has a lightweight core and optional plugins. All plugins (including IRC) are independent and can be unloaded.
  • Multi-platform: WeeChat runs on GNU/Linux, *BSD, GNU/Hurd, Haiku, macOS and Windows (Bash/Ubuntu and Cygwin).
  • Multi-protocols: WeeChat is designed to support multiple protocols by plugins, like IRC.
  • Standards-compliant: the IRC plugin is compliant with RFCs 1459, 2810, 2811, 2812, 2813 and 7194.
  • Small, fast, and very light: the core is and should stay as light and fast as possible.
  • Customizable and extensible: there are a lot of options to customize WeeChat, and it is extensible with C plugins and scripts (Perl, Python, Ruby, Lua, Tcl, Scheme, JavaScript and PHP).
  • Fully documented: there is comprehensive documentation, which is translated into several languages.
  • Developed from scratch: WeeChat was built from scratch and is not based on any other client.
  • Free software: WeeChat is released under GPLv3.

WeeChat

On WeeChat's website you can find more screenshots.

Installation

WeeChat can be installed using your favorite package manager (recommended) or by compiling it yourself.
For detailed instructions, please check the WeeChat user's guide.

Semantic versioning

WeeChat is following a "practical" semantic versioning, see file CONTRIBUTING.md.

Copyright

Copyright © 2003-2024 Sébastien Helleu

This file is part of WeeChat, the extensible chat client.

WeeChat is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.

WeeChat is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with WeeChat. If not, see https://www.gnu.org/licenses/.

scripts's People

Contributors

ailin-nemui avatar arza-zara avatar blackm0re avatar butlerx avatar crazycatdevs avatar darkdefender avatar de-vri-es avatar emersion avatar fixato avatar flashcode avatar freshprince avatar germainz avatar macgyvernl avatar mmb avatar nesthib avatar notmatti avatar nullsym avatar oxzi avatar pr3d4t0r avatar r1cochet avatar ratler avatar sim642 avatar sindresorhus avatar stfnm avatar stravy avatar taupan avatar tomoe-mami avatar torhve avatar trygveaa avatar weechatter avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

scripts's Issues

urlgrab.py: Pressing enter / home / end does not work

I just installed urlgrab and in the urlgrab buffer, pressing enter to open up an url didn't work. Running /url **enter works, so this is a problem with the keybinding. Pressing the up/down arrows worked normally, but home and end didn't work either.

It seems that there is an extra "meta" in the keybinding that my setup doesn't generate. Also, the home binding had an extra ./ that didn't happen here.

To fix this, I added these lines to the init function, and now all keys work:

    weechat.buffer_set(urlgrab_buffer, "key_bind_ctrl-J",        "/url **enter")
    weechat.buffer_set(urlgrab_buffer, "key_bind_ctrl-M",        "/url **enter")
    weechat.buffer_set(urlgrab_buffer, "key_bind_meta2-1~",    "/url **scroll_top")
    weechat.buffer_set(urlgrab_buffer, "key_bind_meta2-4~",      "/url **scroll_bottom")

Not sure if the existing bindings were wrong, or if some setups generate different sequences, but perhaps the above bindings should just be added? Or is something broken on my system?
I'm running weechat inside tmux inside uxterm, if that helps.

urlserver.py locked up Weechat

I guess this could be avoided by setting http_hostname/http_hostname_display, but urlserver locked up when I did /disconnect -all and then /reconnect -all after I turned on a VPN. The backtrace is below. I don't know if there is any way to put a timeout in whatever python method does gethostbyname(), but it would be nice.

#0  0x0000003bf4eea9dd in poll () at ../sysdeps/unix/syscall-template.S:81
#1  0x0000003bf7a0ae29 in send_dg (resplen2=0x7fff6b809fc0, anssizp2=0x7fff6b809fb0, ansp2=0x7fff6b809ff0, anscp=0x7fff6b809fe0, gotsomewhere=<synthetic pointer>, v_circuit=<synthetic pointer>, ns=0, terrno=0x7fff6b808620, anssizp=0x7fff6b808760, 
    ansp=0x7fff6b808618, buflen2=24, buf2=0x7fff6b8087a8 ")\"\001", buflen=24, buf=0x7fff6b808790 "\203m\001", statp=0x3bf51bd3e0 <_res@GLIBC_2.2.5>) at res_send.c:1059
#2  __libc_res_nsend (statp=statp@entry=0x3bf51bd3e0 <_res@GLIBC_2.2.5>, buf=buf@entry=0x7fff6b808790 "\203m\001", buflen=<optimized out>, buf2=buf2@entry=0x7fff6b8087a8 ")\"\001", buflen2=buflen2@entry=24, ans=ans@entry=0x7fff6b809370 ")\"\201\205", 
    anssiz=anssiz@entry=2048, ansp=ansp@entry=0x7fff6b809fe0, ansp2=ansp2@entry=0x7fff6b809ff0, nansp2=nansp2@entry=0x7fff6b809fb0, resplen2=resplen2@entry=0x7fff6b809fc0) at res_send.c:556
#3  0x0000003bf7a08d47 in __GI___libc_res_nquery (statp=statp@entry=0x3bf51bd3e0 <_res@GLIBC_2.2.5>, name=0x1ddcbc4 "mithos", class=class@entry=1, type=type@entry=62321, answer=answer@entry=0x7fff6b809370 ")\"\201\205", anslen=anslen@entry=2048, 
    answerp=answerp@entry=0x7fff6b809fe0, answerp2=answerp2@entry=0x7fff6b809ff0, nanswerp2=nanswerp2@entry=0x7fff6b809fb0, resplen2=resplen2@entry=0x7fff6b809fc0) at res_query.c:226
#4  0x0000003bf7a098c7 in __libc_res_nquerydomain (domain=0x0, resplen2=0x7fff6b809fc0, nanswerp2=0x7fff6b809fb0, answerp2=0x7fff6b809ff0, answerp=0x7fff6b809fe0, anslen=2048, answer=0x7fff6b809370 ")\"\201\205", type=62321, class=1, 
    name=<optimized out>, statp=0x3bf51bd3e0 <_res@GLIBC_2.2.5>) at res_query.c:582
#5  __GI___libc_res_nsearch (statp=0x3bf51bd3e0 <_res@GLIBC_2.2.5>, name=name@entry=0x1ddcbc4 "mithos", class=class@entry=1, type=type@entry=62321, answer=answer@entry=0x7fff6b809370 ")\"\201\205", anslen=anslen@entry=2048, 
    answerp=answerp@entry=0x7fff6b809fe0, answerp2=answerp2@entry=0x7fff6b809ff0, nanswerp2=nanswerp2@entry=0x7fff6b809fb0, resplen2=resplen2@entry=0x7fff6b809fc0) at res_query.c:487
#6  0x00007f8b04077c2d in _nss_dns_gethostbyname4_r (name=name@entry=0x1ddcbc4 "mithos", pat=pat@entry=0x7fff6b80a680, buffer=buffer@entry=0x7fff6b80a090 "", buflen=buflen@entry=1064, errnop=errnop@entry=0x7fff6b80a650, 
    herrnop=herrnop@entry=0x7fff6b80a6b0, ttlp=ttlp@entry=0x0) at nss_dns/dns-host.c:314
#7  0x0000003bf4edb046 in gaih_inet (name=<optimized out>, name@entry=0x1ddcbc4 "mithos", service=<optimized out>, req=req@entry=0x7fff6b80a940, pai=pai@entry=0x7fff6b80a7c0, naddrs=naddrs@entry=0x7fff6b80a7b0) at ../sysdeps/posix/getaddrinfo.c:850
#8  0x0000003bf4ede64d in __GI_getaddrinfo (name=0x1ddcbc4 "mithos", service=0x0, hints=0x7fff6b80a940, pai=0x7fff6b80a938) at ../sysdeps/posix/getaddrinfo.c:2405
#9  0x00007f8b0610ad02 in ?? () from /usr/lib64/python2.7/lib-dynload/_socketmodule.so
#10 0x00007f8b0610d5b7 in ?? () from /usr/lib64/python2.7/lib-dynload/_socketmodule.so
#11 0x0000003a220e0bd4 in PyEval_EvalFrameEx () from /lib64/libpython2.7.so.1.0
#12 0x0000003a220e21ed in PyEval_EvalCodeEx () from /lib64/libpython2.7.so.1.0
#13 0x0000003a220e089f in PyEval_EvalFrameEx () from /lib64/libpython2.7.so.1.0
#14 0x0000003a220e21ed in PyEval_EvalCodeEx () from /lib64/libpython2.7.so.1.0
#15 0x0000003a220e089f in PyEval_EvalFrameEx () from /lib64/libpython2.7.so.1.0
#16 0x0000003a220e21ed in PyEval_EvalCodeEx () from /lib64/libpython2.7.so.1.0
#17 0x0000003a220e089f in PyEval_EvalFrameEx () from /lib64/libpython2.7.so.1.0
#18 0x0000003a220e21ed in PyEval_EvalCodeEx () from /lib64/libpython2.7.so.1.0
#19 0x0000003a2206f0f8 in ?? () from /lib64/libpython2.7.so.1.0
#20 0x0000003a2204a0c3 in PyObject_Call () from /lib64/libpython2.7.so.1.0
#21 0x0000003a2204a1a5 in ?? () from /lib64/libpython2.7.so.1.0
#22 0x0000003a2204a28e in PyObject_CallFunction () from /lib64/libpython2.7.so.1.0
#23 0x00007f8b06a8c1e0 in weechat_python_exec (script=0x1dd3fb0, ret_type=0, function=0x1984760 "urlserver_print_cb", format=0x7f8b06abb123 "ssssssss", argv=0x7fff6b80f690) at /home/agpotter/git/weechat/src/plugins/python/weechat-python.c:352
#24 0x00007f8b06a9ee46 in weechat_python_api_hook_print_cb (data=0x1dd5c90, buffer=0x1a8cce0, date=1396209485, tags_count=4, tags=0x1a90050, displayed=1, highlight=0, prefix=0x2c688e0 "--", 
    message=0x28ea890 "Global ([email protected]): [Logon News - Dec 16 2013] Own a large/active channel or plan to get one going? Please read http://s.rizon.net/authline") at /home/agpotter/git/weechat/src/plugins/python/weechat-python-api.c:2446
#25 0x000000000049828f in hook_print_exec (buffer=0x1a8cce0, line=0x2c991a0) at /home/agpotter/git/weechat/src/core/wee-hook.c:2181
#26 0x0000000000448f94 in gui_chat_printf_date_tags (buffer=0x1a8cce0, date=1396209485, tags=0x7f8b077e79c0 <string.6777> "irc_notice,notify_private,nick_Global,log1", message=0x7f8b075d96df "%s%s%s %s(%s%s%s)%s: %s")
    at /home/agpotter/git/weechat/src/gui/gui-chat.c:770
#27 0x00007f8b075a0380 in irc_protocol_cb_notice (server=0x19bb5f0, date=0, nick=0x2e6af40 "Global", address=0x302ce00 "[email protected]", host=0x1b63190 "[email protected]", command=0x7f8b075d9090 "notice", ignored=0, argc=22, argv=0x302b100, 
    argv_eol=0x30015e0) at /home/agpotter/git/weechat/src/plugins/irc/irc-protocol.c:1310
#28 0x00007f8b075b0974 in irc_protocol_recv_command (server=0x19bb5f0, 
    irc_message=0x28dd400 ":[email protected] NOTICE talisein :[\002Logon News\002 - Dec 16 2013] Own a large/active channel or plan to get one going? Please read http://s.rizon.net/authline", msg_tags=0x0, msg_command=0x2ceee20 "NOTICE", 
    msg_channel=0x2d47280 "talisein") at /home/agpotter/git/weechat/src/plugins/irc/irc-protocol.c:5343
#29 0x00007f8b075baee1 in irc_server_msgq_flush () at /home/agpotter/git/weechat/src/plugins/irc/irc-server.c:2541
#30 0x00007f8b075bb13a in irc_server_recv_cb (data=0x19bb5f0, fd=67) at /home/agpotter/git/weechat/src/plugins/irc/irc-server.c:2627
#31 0x00000000004969e3 in hook_fd_exec (read_fds=0x7fff6b810ca0, write_fds=0x7fff6b810c20, exception_fds=0x7fff6b810ba0) at /home/agpotter/git/weechat/src/core/wee-hook.c:1329
#32 0x000000000042c2fd in gui_main_loop () at /home/agpotter/git/weechat/src/gui/curses/gui-curses-main.c:503
#33 0x000000000046b727 in main (argc=1, argv=0x7fff6b810e68) at /home/agpotter/git/weechat/src/core/weechat.c:477

[urlserver.py] GitHub URLs have %0F added

With plugins.var.python.urlserver.display_urls_in_msg set to on, it seems URLs posted by the GitHub IRC bot (which can be enabled in a repo under "services") somehow get corrupted:

<qutebrowser-gh> [qutebrowser] The-Compiler pushed 1 new commit to master: http://git.io/vm3dF [ http://cmpl.cc:8888/7pv ]

The git.io URL works fine, but the urlserver URL redirects to http://git.io/vm3dF%0F, i.e. an extra %0F at the end.

This is with urlserver 1.9 on WeeChat 1.3-dev (from -git)

A new Color feature for iset

A new Feature that would really, really be sweet is when viewing iset options, is that anything with a color name or number value in it would show that color in iset.

Would make it much easier to see the color option you wish to change and
especially when using alt-- , alt-shft-+ , to change the color.

You could then view the color change on the fly, without having to revert to the /color command to find a color number to make the change.

awesome :)

histsearch.py: Can't see all results

When running the /histsearch command, if there are a large number number of results, the results go pass the edge of the screen. When hitting tab to select different results, the selection can be off the screen so the user doesn't know what option is currently selected.

chanop.py: freezes when using excess wildcards

Something like /mode #channel +b *!*@************ can freeze WeeChat entirely at 100% CPU usage.

I'm not sure if this issue is remotely exploitable (I'm thinking that the Affects: whoever is only displayed when you're (un)setting a ban).

Using WeeChat 1.1.1 and chanop.py 0.3.1.

chanop.py: extban awareness

Mainly $a (nickserv account) and $j (banlist from another channel).

It would be nice if I could see which people are affected by extbans.

For example if I set /mode +b $a:Dysforia I would like to know that it affects users Dysforia and Euforia who are logged in as the same name. (These two are my bots.)

Or if I am on channels #chan and #nel and #nel sets mode +b $j:#chan and #chan sets mode +b troll*!*@* I would like to see that on #nel where the user is also.

I hope I am making any sense and if I don't, but you understand anyway, please add comment with better explaining. I think that the first example makes more sense.

autosort.py: "error buffer not found" and weird sorting

Whenever autosort.py does sorting, it gives this to core buffer:

17:32:09 =!= Error: buffer not found
17:32:09 =!= Error: buffer not found
17:32:09 =!= Error: buffer not found
17:32:09 =!= Error: buffer not found
17:32:09 =!= Error: buffer not found
17:32:09 =!= Error: buffer not found
17:32:09 =!= Error: buffer not found

and moves core buffer as the last buffer. I think that it should always be buffer number 1, but as I am getting that error, I don't know if it's supposed to be the last.

I have 7 networks like errors and my buffers.look.short_names is off. I think that this might be related.

Request for a new script, permitting for a new "Bookmarks" feature:

"Bookmarks" would have the main function of placing bookmarks in the chat buffer for future reference.

Usage of it would permit the user to: mark interesting conversation one would wish to reference, or to mark snippits of code examples given in a channel (especially useful on freenode), or maybe you are catching up on some reading and you got 400 lines to go, but someone just said something, so you pop to the bottom using alt-end and then you might want to pop back to that bookmark you just created, where you left off at.

Design of it would involve possibly highlighting the timestamp for placement of the bookmarkers, or a colorized ">" on the right hand side of the timestamp to indicate the bookmark location or anything similar the author would choose, which could serve as markers for the bookmarks.
The author could possibly impliment this by associating a buffers timestamp with a bookmark name in a bookmarks.dat or .conf file.

Some features that it could include are:
/bookmark list -- list all bookmarks
/bookmark goto -- goto bookmark name
alt-m -- toggle bookmark on/off (and when first toggled on ask for a name for the bookmark).
alt->/alt-< -- goto previous/next bookmark in the buffer.

and a status bar item would be nice, with a bookmark count for that buffer.

If anybody likes this idea, or has suggestions, please comment on it.
Thanks

automode.py: feature request: ability to globally automode hostmasks.

It would be nice to be able to automode (op) my other clients like my bot everywhere when it joins. Exspecially with IRCnet and other networks which don't have services.

I asked this at IRC some time ago, but didn't get response and I just got

17:54:15         m4v | Mikaela: yes, is my script, but I'm not writing scripts anymore.

in reply to issue #4 .

urlserver.py's http_allowed_ips has a misleading example in the description

Hi,

The description for plugins.var.python.urlserver.http_allowed_ips says

regex for IPs allowed to use server (example: "^(123.45.67.89|192.160.*)$")

which is wrong. A period (.) matches any single character but that's not much of an issue. What's an issue here is that the second IP with a wildcard in it is also notated wrong. People think (after reading the example) that IPs have to be pritten with a normal period and * for a wildcard, but since this is regex, people using for example 123.45.6.* will obviously match 123.45.6.* but also 123.45.61._, 123.45.63._, 123.45.63.*, ...

I suggest changing the description to hint the use of backslash escaping for regular expressions:

^(123\.45\.67\.89|192\.160\..*)$

[otr.py] Issues when messaging @#chan

WeeChat 0.4.4-dev (git: v0.4.3-309-g6981a17)
I did a /msg @#mychan test:

Traceback (most recent call last):
  File "/home/rschwab/.weechat/python/autoload/weechat_otr.py", line 798, in message_out_cb
    context = ACCOUNTS[local_user].getContext(to_user)
  File "/usr/lib/python2.7/site-packages/potr/context.py", line 536, in getContext
    self.ctxs[uid] = self.contextclass(self, uid)
  File "/home/rschwab/.weechat/python/autoload/weechat_otr.py", line 336, in __init__
    self.peer_nick, self.peer_server = peername.split('@')
ValueError: too many values to unpack

go.py: also autocomplete buffers/nicks if they start with *

ZNC's modules start with * by default and I just installed this script in hope it would autocomplete *status and *alias and whatever module I happen to be missing.

Before reporting an issue, it’s better to contact the author of script directly.
If you have no answer, or if the author has no time to fix the problem, then you can report the issue in the tracker (or send an update of script if you are able to fix yourself).

I think the author is @flashcode who will surely read this issue tracker and if not, it's someone who watches the issue tracker anyway.

  • WeeChat 1.4-dev (git: v1.3-31-g4b2abd9) [compiled on Aug 31 2015 18:10:21]

automode.py doesn't support extended-join

When extended-join is enabled with

/quote cap req extended-join

automode.py starts filling core buffer with error messages (I don't sadly have them, but the appear almost immediately when before mentioned command is used) when people join channels.

Reported to original author and here, because

17:54:15         m4v | Mikaela: yes, is my script, but I'm not writing scripts anymore.

stalker: show the messags in correct server buffer not in core

freenode buffer:

2014-07-16 15:16:08+0300 -- [nils_2] (~nils_2@unaffiliated/nils-2/x-2480262): D’oh
2014-07-16 15:16:09+0300 -- [nils_2] #weechat-offtopic #weechat
2014-07-16 15:16:09+0300 -- [nils_2] card.freenode.net (Washington, DC, USA)
2014-07-16 15:16:09+0300 -- [nils_2] is away: Detached from screen
2014-07-16 15:16:09+0300 -- [nils_2] idle: 00 hours 03 minutes 12 seconds, signon at: 2014-07-15 19:16:32+0300
2014-07-16 15:16:09+0300 -- [nils_2] is logged in as nils_2
2014-07-16 15:16:09+0300 -- [nils_2] End of /WHOIS list.

core buffer:

2014-07-16 15:16:09+0300 -- [stalker] nils2

#weechat at freenode

2014-07-16 14:50:29+0300 < Mikaela> nils_2: Can stalker show itself in server buffers instead of always going to core buffer?
2014-07-16 15:12:25+0300 < nils_2> not now Mikaela. but you could add a task (i always wanted to say that task thing \o/)

translate.py do not work at all

I typed /translate en_it I want this string in italian
Here is the output:
14:06 python: stdout/stderr: Traceback (most recent call last):
14:06 python: stdout/stderr: File "/home/launch/.weechat/python/autoload/translate.py", line 91, in translate_process_cb
14:06 python: stdout/stderr: translated = ''.join([x['trans'] for x in json.loads(translate['stdout'])['sentences']])
14:06 python: stdout/stderr: File "/usr/lib/python2.7/json/init.py", line 338, in loads
14:06 python: stdout/stderr: return _default_decoder.decode(s)
14:06 python: stdout/stderr: File "/usr/lib/python2.7/json/decoder.py", line 366, in decode
14:06 python: stdout/stderr: obj, end = self.raw_decode(s, idx=_w(s, 0).end())
14:06 python: stdout/stderr: File "/usr/lib/python2.7/json/decoder.py", line 384, in raw_decode
14:06 python: stdout/stderr: raise ValueError("No JSON object could be decoded")
14:06 python: stdout/stderr: ValueError: No JSON object could be decoded
14:06 =!= python: error in function "translate_process_cb"

chanop.py has issues with banmask

  1. chanop.py doesn't follow irc.network.ban_mask_default
    My irc.network.ban_mask_default is set to *!*@*$host
  2. chanop.py has different syntax for banmask that doens't include help text
    Mine is set to *host and I would expect it to work like the first example, ban *!*@*host.

Adding the * there helps with webchat users at freenode as *!*@IP only matches webchat and normal clients, but doesn't match kiviirc while *!*@*IP matches all three.

invitedby.rb: doesn't do anything.

I think that the description

Display "invited by" messages in their own channel.

means that when I am invited, this script should output to channel something like "invited by ChanServ" or whoever, but it doesn't do that.

The script doesn't contain any help or commands.

WeeChat 0.4.4-dev (git: v0.4.3-227-g62d3c4e) [compiled on Mar  7 2014 11:15:01]

lsb_release -a

Distributor ID: Debian
Description:    Debian GNU/Linux 7.4 (wheezy)
Release:        7.4
Codename:       wheezy

ruby --version

ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]

weestats.py: some things aren't detected correctly

After I do /allpv close there are still 7 irc queries open.

2014-06-12 18:40:39+0300 <+Mikaela> 1 windows used (0 vertically / 0 horizontally split). 120 (of which 0 merged) buffers open: 1 core, 1 perl, 1 script, 101 irc channels, 7 irc queries, 9 irc servers

I think that weestats is detecting channels which don't start with # as I am using BitlBee with channels &bitlbee,&0,&1,&2,&3,&4 and I have one private channel starting with ! at IRCnet.

buffer_autoset.py treats channel names case sensitively

For example, setting a config entry like buffer_autoset.buffer.irc.somenet.#Lobby.short_name treats the channel name, #Lobby, case sensitively.

The annoyance of this is that when the channel on somenet turns out to be a different case (such as #lobby), buffer_autoset options fail to apply. Also, setting another entry named buffer_autoset.buffer.irc.somenet.#lobby.short_name without removing the old one refuses to work because the configuration DB is case insensitive.

Could not fetch Last.fm RSS feed

hi. since the lastfm upgrades on their site I always get Could not fetch Last.fm RSS feed when calling lastf.py. I cannot see any reference at all on the issues tracker so Im afraid im missing something. If I do, my apologies, if not heres the issue I get.

regards.

Non-Working script (weatherbot.py)

WeatherUnderground's login page is broken, so no new users are able to login, unless someone has found out a way, as when I try to login to my account on wu it just switches @ with %40 and then it says my stuff is incorrect, because of itself >_<

grep.py only greps the latest logfile

Yesterday I changed my logger.file.mask to $plugin/$name/%Y-%m-%d.weechatlog and today I noticed that grep searches only for the latest file.

I have logs also with the default name $plugin.$name.weechatlog and daily logs with the new name.

[colorize_nicks.py] greedy matching behavior in python3

Disabling greedy matching breaks the plugin in that nothing gets colored. I think the offending line is 164

if str(type(match)) == "<type '_sre.SRE_Match'>":

In python3, type(match) is <class '_sre.SRE_Match'>. I changed this line and proper coloring was restored; however this change would be incompatible with python 2.7.

query_blocker: add option for working only on specific networks (comma-separated)?

I am using umode +g (my blog: 1 & 2) on all networks that support it, but sadly not all networks have it. For those it would be nice to be able to tell query_blocker to only block queries on those networks even if it's lesser and client-side form of the same thing.

Networks that I am on and don't have it:

  • dereferenced
    • not implemented yet
  • ircnet
    • won't ever happen
  • mozilla
    • I don't understand why they don't have it (because module isn't loaded, but why?) as it's supported by InspIRCd.

IRCnet brings me most of unwanted queries and I get a lot of stress/anxiety from not having any kind of protection against it. Because I use ZNC this issue wouldn't help so much either, but it would be at least a little help.

screen_away.py: please add the time when detaching happened.

I tried to do this by myself, but didn't get forward at all. I only found two things:

  • The following should be added to imports:
    • from time import strftime
  • The time can be get with:
    • strftime("%Y-%m-%d %H:%M:%S%z")
      • This is ISO 8601 & RFC 3339 format.

I tried adding new option for timestamp, but then I couldn't find out how do I access it and when I removed the option and added it directly to the code, automatic back stopped working.

I have no experience with Python, so this can probably explain why I cannot do anything.

[windicate.py] Not working on Ubuntu 14.04 / weechat 0.4.3

If I put this script in ~/.weechat/python/autoload, I get an error message on startup that it can't determine the weechat FIFO:

Weechat variable fifo_filename is not set.  Is the fifo plugin enabled?

However, the FIFO plugin does seem to be loading as I always have a FIFO file at ~/.weechat/weechat_fifo_$PID when running weechat, and in ~/.weechat/plugins.conf I have fifo.fifo = "on".

If I move the plugin to ~/.weechat/python/ and load it manually after starting weechat with /python load windicate.py, I do not get any error messages. So I don't know if there's a race condition with the fifo_filename info being available for autoloaded scripts or what is going on there exactly.

Anyway, in either script loading scenario, the script does not work - I get no indicator in the menu bar when someone mentions me or private messages me.

I'm on Ubuntu 14.04 and weechat 0.4.3:

WeeChat 0.4.3 [compiled on Feb  9 2014 16:02:50]
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04 LTS
Release:        14.04
Codename:       trusty
$ uname -a
Linux avoelke-desktop 3.13.0-30-generic #54-Ubuntu SMP Mon Jun 9 22:45:01 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

I also have the three packages listed as requirements already installed:

$ sudo apt-get install python-indicate python-dbus wmctrl
Reading package lists... Done
Building dependency tree       
Reading state information... Done
python-dbus is already the newest version.
python-indicate is already the newest version.
wmctrl is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

This script used to work when I was on Ubuntu 12.04 and using an older version of weechat, however I don't know if it's the Ubuntu 14.04 or weechat upgrade that is causing issues.

/cc @LeonB @solidgoldbomb

topicdiff.py: colours aren't handled

2015-07-10 16:44:35+0300 -- Bitcoin has changed topic for #bitcoins.fi from "BTC (Bitstamp): $283.57/253.41e  High: $290.12/259.27e  Low: $267.41/238.97e  Diff: -4,56% (47G) in 1 day, 9 hours  HR: 353,63 PH/s" to "BTC (Bitstamp): $287.00/256.48e  High: $290.12/259.27e  Low: $267.41/238.97e  Diff: -4,56% (47G) in 1 day, 8 hours  HR: 353,63 PH/s"
2015-07-10 16:44:35+0300  -: 7BTC (Bitstamp): 03$283.57/03253.41e  7High: 03$290.12/03259.27e  7Low: 03$267.41/03238.97e  7Diff: 03-4,56% (47G) in 1 day, 9 hours  7HR: 03353,63 PH/s
2015-07-10 16:44:35+0300  +: 7BTC (Bitstamp): 03$287.00/03256.48e  7High: 03$290.12/03259.27e  7Low: 03$267.41/03238.97e  7Diff: 03-4,56% (47G) in 1 day, 8 hours  7HR: 03353,63 PH/s

This should either be shown with colours or as plain text without the broken colour codes. Preferably there would be option which to do.

Go.py: Jump to window if available

It would make things work a little less messier if there was an option to make it so instead of switching the active window to the specified buffer, to instead see if said buffer is already open in a window, and if so switch to that window, and then if not act as normal(change active window's buffer).

autosetbuffer on title property only works for private buffers

I typed /autosetbuffer add irc.bitlbee.&facebook title Facebook
Then I restarted weechat but the &facebook channel has no title at all.
I also do the same for an exec buffer /autosetbuffer add exec.exec.conky title Conky - the light-weight system monitor
Then I restarted weechat, typed /exec -norc -buffer conky "true"
But the title is still "Executed commands"
However I Have no problem when I use autosetbuffer title on a private buffer.
The only way to change the title of the &facebook and exec buffers is by doing it manually everytime /buffer set title Facebook

[colorize_nicks.py] IRC color overriding

This plugin doesn't work too well when applied to messages which contain IRC color codes. For example:

  • nick isn't colored when IRC color code is right in front of it or in the middle of it
  • when nick is in a part of the message with IRC color set and is colorized, the color after the nick is "reset" not the one which was supposed to be there

query_blocker.pl: please use NOTICE instead of PRIVMSG for automatc blocking.

According to the RFC 1459, automatic messages must not be sent as response to NOTICEs and currently it might be possible to get in loop of automatic away messages or something similar. The RFC is quoted below.

4.4.2 Notice

      Command: NOTICE
   Parameters: <nickname> <text>

   The NOTICE message is used similarly to PRIVMSG.  The difference
   between NOTICE and PRIVMSG is that automatic replies must never be
   sent in response to a NOTICE message.  This rule applies to servers
   too - they must not send any error reply back to the client on
   receipt of a notice.  The object of this rule is to avoid loops
   between a client automatically sending something in response to
   something it received.  This is typically used by automatons (clients
   with either an AI or other interactive program controlling their
   actions) which are always seen to be replying lest they end up in a
   loop with another automaton.

   See PRIVMSG for more details on replies and examples.

Error in urlbar: weechat.look.color_nicks_number is obsolete

urlbar.py is giving this error recently:

python: error in function "urlbar_print_cb" python: stdout/stderr: Traceback (most recent call last): python: stdout/stderr: File "/home/swimmer/.weechat/python/autoload/urlbar.py", line 177, in urlbar_print_cb python: stdout/stderr: urlobject = URL(url, get_buffer_name(buffer), time, prefix) python: stdout/stderr: File "/home/swimmer/.weechat/python/autoload/urlbar.py", line 143, in **init** python: stdout/stderr: self.nick = irc_nick_find_color(nick.strip('%&@+')) python: stdout/stderr: File "/home/swimmer/.weechat/python/autoload/urlbar.py", line 232, in irc_nick_find_color python: stdout/stderr: color %= weechat.config_integer(weechat.config_get("weechat.look.color_nicks_number")) python: stdout/stderr: TypeError: not all arguments converted during string formatting

As stated in the #weechat channel that's due to an obsolete config variable.

topicdiff.py also considers server buffer as channel buffer

Move to server buffer and try getting topics for two channels that you aren't on and you will get:

2014-12-09 13:12:56+0200 -- Topic for #gnupg is "GnuPG: the GNU Privacy Guard - www.gnupg.org || Please be patient waiting for answers || "gpg --with-colons --fast-list-mode --list-sigs <foo> | awk -F ':' '$1 ~ /sig|rev/ {print $5}' | sort -u | xargs gpg --recv""
2014-12-09 13:12:56+0200 -- Topic for #gnupg set by weasel ([email protected]) on 2014-04-13 18:57:01+0300
2014-12-09 13:13:15+0200 -- Topic for #music is "Welcome to #music, a channel for general music discussion ~ Enjoy your stay :) what's that song? try http://www.midomi.com/"
2014-12-09 13:13:15+0200  -: xargs gpg --recv"
2014-12-09 13:13:15+0200  -: awk -F ':' '$1 ~ /sig|rev/ {print $5}'
2014-12-09 13:13:15+0200  -: "gpg --with-colons --fast-list-mode --list-sigs <foo>
2014-12-09 13:13:15+0200  -: GnuPG: the GNU Privacy Guard - www.gnupg.org
2014-12-09 13:13:15+0200  -: sort -u
2014-12-09 13:13:15+0200  -: Please be patient waiting for answers
2014-12-09 13:13:15+0200  +: Welcome to #music, a channel for general music discussion ~ Enjoy your stay :) what's that song? try http://www.midomi.com/
2014-12-09 13:13:15+0200 -- Topic for #music set by kloeri on 2013-08-15 11:25:03+0300

[urlserver.py] Unknown CTCP with /me and display_urls_in_msg

With plugins.var.python.urlserver.display_urls_in_msg set to on, when someone posts an URL in an action (/me), this happens:

10:16  * henk hat natürlich, um wenig Aufwand zu haben, eine kurze genommen, aber jetzt weiss er vmtl., worauf The-Compiler hinaus will und hofft, dass https://www.google.ch/search?sclient=psy-ab&hl=de&site=&source=hp&q=eine%20url&pbx=1&oq=&aq=&aqi=&aql=&gs_sm=&gs_upl= lang genug ist und der Text rundrum auch irgendwas bringt, aber das hängt wohl von The-Compilers terminal-breite ab …
10:16 -- Unknown CTCP requested by henk: [ http://cmpl.cc:8888/7pt ]

This is with urlserver 1.9 on WeeChat 1.3-dev (from -git)

buffers.pl automatic scrolling

It would be nice if the buffer bar automatically scrolled to include the active buffer. Here is a demonstration of what I mean. The buffer bar is at the top.

Current behavior:

Current, non-scrolling buffers.pl

Desired behavior:

This would be an awesome feature

A similar feature request seems to have been brought up some years ago.

topicdiff.py: allow disabling per channel

bitcoins.fi at IRCnet shows bitcoin currency changes in topic and I don't necressarily want to have diffs about it so option for disabling it per channel would be nice.

chanop.py: /obankick don't work when autodeop_delay = 0

When plugins.var.python.chanop.autodeop_delay is 0 /obankick does not work, because it deop's before kick. It should wait for kick and then deop.
Version: WeeChat 0.4.3
chanop.py: 0.3.1
reproducible example:
/set plugins.var.python.chanop.autodeop_delay 0
/obankick user

after ban:
"You're not a channel operator" and it will not kick.

I think this was fixed in the past:
2013-01-02
version 0.2.7: bug fixes:

  • fix /obankick, don't deop before kicking.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.