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 ."