tweaaks
This commit is contained in:
parent
931eb1f51a
commit
dde9b97223
2 changed files with 9 additions and 8 deletions
|
@ -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
|
||||
|
|
9
plugins/todo.py → plugins/notes.py
Executable file → Normal file
9
plugins/todo.py → plugins/notes.py
Executable file → Normal file
|
@ -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) <add|del|list|search> 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):
|
Reference in a new issue