Export to GitHub

djangobot - issue #6

missing parameter to "who" causes exception


Posted on Feb 9, 2008 by Grumpy Camel

What steps will reproduce the problem? 1. /msg DjangoBot who

What is the expected output? What do you see instead?

Should send a private message with the text "something went wrong!", or better yet, a description of the syntax of the "who" command. Instead raises this exception:

2008/02/09 12:18 +0300 [DjangoBotProtocol,client] Unhandled Error Traceback (most recent call last): File "/usr/lib/python2.5/site-packages/twisted/internet/tcp.py", line 362, in doRead return self.protocol.dataReceived(data) File "/usr/lib/python2.5/site-packages/twisted/words/protocols/irc.py", line 1478, in dataReceived basic.LineReceiver.dataReceived(self, data.replace('\r', '')) File "/usr/lib/python2.5/site-packages/twisted/protocols/basic.py", line 232, in dataReceived why = self.lineReceived(line) File "/usr/lib/python2.5/site-packages/twisted/words/protocols/irc.py", line 1486, in lineReceived self.handleCommand(command, prefix, params) --- <exception caught here> --- File "/usr/lib/python2.5/site-packages/twisted/words/protocols/irc.py", line 1498, in handleCommand method(prefix, params) File "/usr/lib/python2.5/site-packages/twisted/words/protocols/irc.py", line 1043, in irc_PRIVMSG self.privmsg(user, channel, message) File "djangobot.py", line 54, in privmsg except http.HTTPError: exceptions.NameError: global name 'http' is not defined

What version of the product are you using? On what operating system?

Current trunk on Ubuntu 7.10 and Python 2.5.

Please provide any additional information below.

Patch provided.

Attachments

Comment #1

Posted on Feb 9, 2008 by Grumpy Bird

Fixed in r18. Refactored command handling and improved the who command. This also adds a very basic help command. who now accepts multiple nicknames. Thanks, akaihola for the good ideas.

Status: Fixed

Labels:
Type-Defect Priority-Medium