fix issue with listeners not sending any output (#58)
parent
836a696dc5
commit
81af6ba8bd
|
@ -184,7 +184,7 @@ class Bot(irc.bot.SingleServerIRCBot):
|
||||||
for lstnr in pinhook.plugin.lstnrs:
|
for lstnr in pinhook.plugin.lstnrs:
|
||||||
try:
|
try:
|
||||||
self.logger.debug('whispering to listener: {}'.format(lstnr))
|
self.logger.debug('whispering to listener: {}'.format(lstnr))
|
||||||
output = pinhook.plugin.lstnrs[lstnr](self.Message(
|
listen_output = pinhook.plugin.lstnrs[lstnr](self.Message(
|
||||||
channel=chan,
|
channel=chan,
|
||||||
text=text,
|
text=text,
|
||||||
nick_list=nick_list,
|
nick_list=nick_list,
|
||||||
|
@ -196,10 +196,12 @@ class Bot(irc.bot.SingleServerIRCBot):
|
||||||
ops=self.ops,
|
ops=self.ops,
|
||||||
logger=self.logger
|
logger=self.logger
|
||||||
))
|
))
|
||||||
self.logger.debug(output.msg_type)
|
self.logger.debug(listen_output.msg)
|
||||||
self.logger.debug(output.msg)
|
if listen_output:
|
||||||
|
output = listen_output
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.logger.exception('issue with listener {}'.format(lstnr))
|
self.logger.exception('issue with listener {}'.format(lstnr))
|
||||||
|
self.logger.debug(f'returning output: {output.msg}')
|
||||||
return output
|
return output
|
||||||
|
|
||||||
def process_event(self, c, e):
|
def process_event(self, c, e):
|
||||||
|
@ -237,6 +239,7 @@ class Bot(irc.bot.SingleServerIRCBot):
|
||||||
}
|
}
|
||||||
output = self.call_plugins(**plugin_info)
|
output = self.call_plugins(**plugin_info)
|
||||||
if output:
|
if output:
|
||||||
|
self.logger.debug(f'sending output: {output.msg}')
|
||||||
self.process_output(c, chan, output)
|
self.process_output(c, chan, output)
|
||||||
|
|
||||||
def process_output(self, c, chan, output):
|
def process_output(self, c, chan, output):
|
||||||
|
|
Loading…
Reference in New Issue