Don't show channel names in factoids

This commit is contained in:
Dennis Kaarsemaker 2006-07-11 01:16:43 +02:00
parent 6b305005c0
commit 8e617a13fa

View File

@ -40,7 +40,7 @@ def get_factoid(db, name, channel):
factoid = cur.fetchall()
if len(factoid):
f = factoid[0]
return Factoid(f[0],f[1],f[2],f[3],f[4])
return Factoid(f[0].replace(channel,'')[:-1],f[1],f[2],f[3],f[4])
cur.execute("SELECT name, value, author, added, popularity FROM facts WHERE name = %s", name)
factoid = cur.fetchall()
if len(factoid):