-
-
Save aji/73ee59d09124fd055099 to your computer and use it in GitHub Desktop.
script to reproduce weechat github issue #406
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import weechat | |
COUNTER = 0 | |
def decrease_counter(*args, **kwargs): | |
global COUNTER | |
if COUNTER > 0: | |
COUNTER -= 1 | |
if COUNTER == 0: | |
weechat.prnt('', 'All processes finished') | |
return weechat.WEECHAT_RC_OK | |
def issue406(*args, **kwargs): | |
global COUNTER | |
COUNTER += 1 | |
weechat.hook_process('false', 0, 'decrease_counter', '') | |
return weechat.WEECHAT_RC_OK | |
def issue406url(*args, **kwargs): | |
global COUNTER | |
COUNTER += 1 | |
weechat.hook_process('url:http://127.0.0.1:34567', 0, 'decrease_counter', '') | |
return weechat.WEECHAT_RC_OK | |
weechat.register('repro', 'aji', '1.0', 'MIT', 'github issue #406', '', '') | |
weechat.hook_command('issue406', 'github issue #406', '', '', '', 'issue406', '') | |
weechat.hook_command('issue406url', 'github issue #406 url', | |
'', '', '', 'issue406url', '') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment