diff options
| author | 2018-11-27 14:25:12 +0000 | |
|---|---|---|
| committer | 2018-11-27 14:25:12 +0000 | |
| commit | d13a5069e3a0e78a77bf16effe78f2ba223c495b (patch) | |
| tree | ea7fb7c8dfcb0cea94523572e03b7bab35d7aa49 /modules/github.py | |
| parent | Show list of users in a channel, not just count (diff) | |
| signature | ||
Grab response from functions asked to be executed on the main thread and feed
them back to the callers, allowing rest_api.py to take the main thread while
it's waiting for the response to give back to the requesting client
Diffstat (limited to 'modules/github.py')
| -rw-r--r-- | modules/github.py | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/modules/github.py b/modules/github.py index ecfe8e7a..dbe20b70 100644 --- a/modules/github.py +++ b/modules/github.py @@ -86,16 +86,13 @@ class Module(ModuleManager.BaseModule): for server, channel in targets: for output in outputs: output = "(%s) %s" % (full_name, output) - trigger = self._make_trigger(channel, server, output) - self.bot.trigger(trigger) + self.events.on("send.stdout").call(target=channel, + module_name="Github", server=server, message=line, + hide_prefix=channel.get_setting( + "github-hide-prefix", False)) return True - def _make_trigger(self, channel, server, line): - return lambda: self.events.on("send.stdout").call(target=channel, - module_name="Github", server=server, message=line, - hide_prefix=channel.get_setting("github-hide-prefix", False)) - def _change_count(self, n, symbol, color): return utils.irc.color("%s%d" % (symbol, n), color)+utils.irc.bold("") def _added(self, n): |
