From d15e4ff3cfba879c31fcab85ace28e1216ed5194 Mon Sep 17 00:00:00 2001 From: Luke Rogers Date: Sun, 13 May 2012 17:21:03 +1200 Subject: [PATCH] Fixes --- plugins/factoids.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/plugins/factoids.py b/plugins/factoids.py index 711369b..1774918 100755 --- a/plugins/factoids.py +++ b/plugins/factoids.py @@ -104,8 +104,21 @@ def forget(inp, db=None, input=None, notice=None): notice("I don't know about that.") return +@hook.command() +def info(inp, notice=None, db=None): + ".info -- Shows the source of a factoid." + + db_init(db) + + # attempt to get the factoid from the database + data = get_memory(db, inp.strip()) + + if data: + notice(data) + else: + notice("Unknown Factoid") + -@hook.command("info") @hook.regex(r'^\? ?(.+)') def factoid(inp, say=None, db=None, bot=None, me=None, conn=None, input=None): "? -- Shows what data is associated with ."