From 36d7d0a1cc80a309f30fb81122cdfabde71a84b4 Mon Sep 17 00:00:00 2001 From: lukeroge Date: Thu, 29 Mar 2012 11:19:54 +1300 Subject: [PATCH] Changed code around a bit --- plugins/factoids.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/plugins/factoids.py b/plugins/factoids.py index 106aa14..51388f9 100755 --- a/plugins/factoids.py +++ b/plugins/factoids.py @@ -111,11 +111,9 @@ def forget(inp, db=None, input=None, notice=None): @hook.regex(r'^\? ?(.+)') def factoid(inp, say=None, db=None, bot=None): "? -- Shows what data is associated with ." - try: - prefix_on = bot.config["plugins"]["factoids"]["prefix"] - except KeyError: - prefix_on = False - + + prefix_on = bot.config["plugins"]["factoids"].get("prefix", False) + db_init(db) data = get_memory(db, inp.group(1).strip())