diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/gcalc.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/gcalc.py b/modules/gcalc.py index 6abee92..ea317af 100644 --- a/modules/gcalc.py +++ b/modules/gcalc.py @@ -9,7 +9,8 @@ import urllib, urllib2, json class Module: def __init__(self, bot): self.irc = bot - self.irc.register_keyword('!gcalc', self) + if self.irc: + self.irc.register_keyword('!gcalc', self) def calc(self, s): url = 'http://www.google.com/ig/calculator?%s' % urllib.urlencode({'q': s}) |