I always forget about scopes in for loops
This commit is contained in:
parent
29d8549da1
commit
dc37eb4f2f
1 changed files with 4 additions and 3 deletions
|
@ -39,7 +39,8 @@ class Module(ModuleManager.BaseModule):
|
|||
for server_id, channel_name, _ in hooks:
|
||||
server = self.bot.get_server(server_id)
|
||||
channel = server.get_channel(channel_name)
|
||||
self.bot.trigger(self._make_trigger(channel, server, line))
|
||||
|
||||
self.bot.trigger(lambda: self.events.on("send.stdout"
|
||||
).call(target=channel, module_name="Github",
|
||||
server=server, message=line))
|
||||
def _make_trigger(self, channel, server, line):
|
||||
return lambda: self.events.on("send.stdout").call(
|
||||
target=channel, module_name="Github", server=server, message=line)
|
||||
|
|
Loading…
Reference in a new issue