From dec939c32f5f4de366a8f72eaa85fbc827996041 Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Wed, 26 May 2010 18:38:52 +0200 Subject: Added privmsg callback. --- modules/url_titles.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/url_titles.py b/modules/url_titles.py index d5408ce..3172fac 100644 --- a/modules/url_titles.py +++ b/modules/url_titles.py @@ -15,6 +15,7 @@ class Module: def __init__(self, bot): self.irc = bot + self.irc.register_callback(self) def spotify(self, s): try: @@ -137,7 +138,7 @@ class Module: s += '\002[%d]\002 %s ' % (i+1, format_text(titles[i])) return s.strip() - def __call__(self, nick, channel, msg): + def privmsg(self, nick, channel, msg): titles = self.get_titles(msg) if titles: self.irc.msg(channel if not channel == self.irc.nickname else nick.split('!')[0], titles) -- cgit v1.2.3