CloudBotIRC / CloudBot

CloudBot - The simple, fast, expandable, open-source Python IRC Bot!
GNU General Public License v3.0
273 stars 250 forks source link

Invitation throws errors #232

Closed sbeparey closed 8 years ago

sbeparey commented 8 years ago

Upon inviting the bot, it raises the following errors:

[13:29:20] [ERROR] Error in hook log:log Traceback (most recent call last): File "/home/cloudbot/bot/cloudbot/plugin.py", line 376, in _execute_hook out = yield from self.bot.loop.run_in_executor(None, self._execute_hook_threaded, hook, event) File "/usr/lib/python3.4/asyncio/futures.py", line 388, in iter yield self # This tells Task to wait for completion. File "/usr/lib/python3.4/asyncio/tasks.py", line 286, in _wakeup value = future.result() File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result raise self._exception File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run result = self.fn(_self.args, _self.kwargs) File "/home/cloudbot/bot/cloudbot/plugin.py", line 340, in _execute_hook_threaded return hook.function(_parameters) File "/home/cloudbot/bot/plugins/log.py", line 223, in log text = format_event(event) File "/home/cloudbot/bot/plugins/log.py", line 74, in format_event return format_irc_event(event, args) File "/home/cloudbot/bot/plugins/log.py", line 93, in format_irc_event return irc_formats[event.irccommand].format(args) KeyError: 'chan' [13:29:20] [ERROR] Error in hook log:console_log Traceback (most recent call last): File "/home/cloudbot/bot/cloudbot/plugin.py", line 376, in _execute_hook out = yield from self.bot.loop.run_in_executor(None, self._execute_hook_threaded, hook, event) File "/usr/lib/python3.4/asyncio/futures.py", line 388, in iter yield self # This tells Task to wait for completion. File "/usr/lib/python3.4/asyncio/tasks.py", line 286, in _wakeup value = future.result() File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result raise self._exception File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run result = self.fn(_self.args, _self.kwargs) File "/home/cloudbot/bot/cloudbot/plugin.py", line 340, in _execute_hook_threaded return hook.function(_parameters) File "/home/cloudbot/bot/plugins/log.py", line 240, in console_log text = format_event(event) File "/home/cloudbot/bot/plugins/log.py", line 74, in format_event return format_irc_event(event, args) File "/home/cloudbot/bot/plugins/log.py", line 93, in format_irc_event return irc_formats[event.irccommand].format(args) KeyError: 'chan'

sbeparey commented 8 years ago

This is fixed by changing "chan" to "channel" on log.py line 29.

before: "INVITE": "[{server}] -!- {nick} has invited {target} to {chan}", after: "INVITE": "[{server}] -!- {nick} has invited {target} to {channel}",