summaryrefslogtreecommitdiff
path: root/modules/quotes.py
diff options
context:
space:
mode:
Diffstat (limited to 'modules/quotes.py')
-rw-r--r--modules/quotes.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/modules/quotes.py b/modules/quotes.py
index a5060cd..54cacd9 100644
--- a/modules/quotes.py
+++ b/modules/quotes.py
@@ -16,7 +16,7 @@ class Quotes:
return q
def connect(self, db):
- self.db = PgSQL.connect(database = 'fot')
+ self.db = PgSQL.connect(database = 'fot', host = 'komachi.')
self.updatecount()
def updatecount(self):
@@ -201,13 +201,10 @@ quote_handler = IRCHandler()
class Module:
def __init__(self, bot):
self.irc = bot
+ self.irc.register_keyword('!quote', self)
- def __call__(self, nick, channel, msg):
- if not msg.startswith('!quote'):
- return
+ def keyword(self, nick, channel, kw, msg):
args = msg.split(' ')
- if msg.startswith('!quote'):
- args = args[1:]
cmd = args[0] if len(args) and len(args[0].strip()) else 'random'
args = args[1:]