Package: python-cobe Version: 2.1.0-1 Severity: normal Tags: patch When running cobe irc-client, the bot connects fine, but as soon as someone says something on the channel where cobe is as well, it crashes. I've attached a patch that fixes the problem.
-- System Information: Debian Release: jessie/sid APT prefers testing APT policy: (500, 'testing'), (500, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 3.2.0-4-amd64 (SMP w/4 CPU cores) Locale: LANG=nl_NL.UTF-8, LC_CTYPE=nl_NL.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages python-cobe depends on: ii libpython2.7-stdlib [python-argparse] 2.7.7~rc1-1 ii python 2.7.6-2 ii python-irc 8.5.3+dfsg-2 ii python-pkg-resources 3.6-1 ii python-stemmer 1.3.0+dfsg-1+b4 pn python:any <none> python-cobe recommends no packages. python-cobe suggests no packages. -- no debconf information
Description: Fix the irc-client function. Author: Guus Sliepen <[email protected]> Last-Update: 2014-06-13 --- a/cobe/irc.py +++ b/cobe/irc.py @@ -63,9 +63,9 @@ self.connection.join(self.log_channel) def on_pubmsg(self, conn, event): - user = irc.client.NickMask(event.source()).nick + user = irc.client.NickMask(event.source).nick - if event.target() == self.log_channel: + if event.target == self.log_channel: # ignore input in the log channel return @@ -74,10 +74,10 @@ return # only respond on channels - if not irc.client.is_channel(event.target()): + if not irc.client.is_channel(event.target): return - msg = event.arguments()[0] + msg = event.arguments[0] # strip pasted nicks from messages msg = re.sub("<\S+>\s+", "", msg) @@ -105,7 +105,7 @@ if to == self.nick: reply = self.brain.reply(text).encode("utf-8") - conn.privmsg(event.target(), "%s: %s" % (user, reply)) + conn.privmsg(event.target, "%s: %s" % (user, reply)) class Runner:
_______________________________________________ Python-modules-team mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/python-modules-team

