This commit is contained in:
Luke Rogers 2013-09-11 13:44:02 +12:00
parent 931eb1f51a
commit dde9b97223
2 changed files with 9 additions and 8 deletions

View file

@ -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
View 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):