From dde9b97223235505a354bb2f4966ada27d88a198 Mon Sep 17 00:00:00 2001 From: Luke Rogers Date: Wed, 11 Sep 2013 13:44:02 +1200 Subject: [PATCH] tweaaks --- plugins/karma.py | 8 ++++---- plugins/{todo.py => notes.py} | 9 +++++---- 2 files changed, 9 insertions(+), 8 deletions(-) rename plugins/{todo.py => notes.py} (94%) mode change 100755 => 100644 diff --git a/plugins/karma.py b/plugins/karma.py index 365136d..419e331 100644 --- a/plugins/karma.py +++ b/plugins/karma.py @@ -30,8 +30,8 @@ def up(db, nick_vote): def down(db, nick_vote): db.execute("""UPDATE karma SET - down_karma = down_karma+1, - total_karma = total_karma+1 WHERE nick_vote=?""", (nick_vote.lower(),)) + down_karma = down_karma + 1, + total_karma = total_karma + 1 WHERE nick_vote=?""", (nick_vote.lower(),)) db.commit() @@ -123,9 +123,9 @@ def karma(inp, nick='', chan='', db=None): (nick_vote.lower(),)).fetchall() if not out: - return "no karma" + return "That user has no karma." else: out = out[0] - return "'%s' has %s karma" % (nick_vote, out[1]-out[2]) + return "%s has \x02%s\x02 karma." % (nick_vote, out[1]-out[2]) return diff --git a/plugins/todo.py b/plugins/notes.py old mode 100755 new mode 100644 similarity index 94% rename from plugins/todo.py rename to plugins/notes.py index d18177d..6c6e450 --- a/plugins/todo.py +++ b/plugins/notes.py @@ -88,9 +88,10 @@ def db_search(db, nick, query): """, (query, nick)) +@hook.command("notes") @hook.command -def todo(inp, nick='', chan='', db=None, notice=None, bot=None): - "todo (add|del|list|search) args -- Manipulates your list of todos." +def note(inp, nick='', chan='', db=None, notice=None, bot=None): + "note(s) args -- Manipulates your list of notes." db_init(db) @@ -100,7 +101,7 @@ def todo(inp, nick='', chan='', db=None, notice=None, bot=None): args = parts[1:] # code to allow users to access each others factoids and a copy of help - # ".todo (add|del|list|search) [@user] args -- Manipulates your list of todos." + # ".note (add|del|list|search) [@user] args -- Manipulates your list of todos." #if len(args) and args[0].startswith("@"): # nick = args[0][1:] # args = args[1:] @@ -113,7 +114,7 @@ def todo(inp, nick='', chan='', db=None, notice=None, bot=None): db_add(db, nick, text) - notice("Task added!") + notice("Note added!") return elif cmd == 'get': if len(args):