~ubuntu-branches/ubuntu/precise/gozerbot/precise

« back to all changes in this revision

Viewing changes to debian/gozerbot/usr/lib/python2.5/site-packages/gozerplugs/plugs/todo.py

  • Committer: Bazaar Package Importer
  • Author(s): Jeremy Malcolm
  • Date: 2008-06-02 19:26:39 UTC
  • mfrom: (1.1.3 upstream) (3.1.1 lenny)
  • Revision ID: james.westby@ubuntu.com-20080602192639-3rn65nx4q1sgd6sy
Tags: 0.8.1-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
#
3
3
#
4
4
 
5
 
""" provide todo related commands """
 
5
""" manage todo lists .. by user or by channel .. a time/data string can 
 
6
 be provided to set time on a todo item.
 
7
"""
6
8
 
7
9
__copyright__ = 'this file is in the public domain'
8
10
 
18
20
from gozerplugs.plugs.alarm import alarms
19
21
import time, thread, os
20
22
 
21
 
plughelp.add('todo', 'manage todo lists .. by user or by channel .. a \
22
 
time/data string can be provided.')
 
23
plughelp.add('todo', 'todo lists')
23
24
 
24
25
todolock = thread.allocate_lock()
25
26
locked = lockdec(todolock)
232
233
        return res
233
234
        return result
234
235
 
235
 
    def setprio(self, todonr, prio):
 
236
    def setprio(self, who, todonr, prio):
236
237
        """ set priority of todonr """
237
238
        result = db.execute(""" UPDATE todo SET priority = %s WHERE indx \
238
239
= %s """, (prio, todonr))
250
251
indx = %s """, todonr)
251
252
        return result
252
253
 
253
 
    def settime(self, todonr, ttime):
 
254
    def settime(self, who, todonr, ttime):
254
255
        """ set time of todonr """
255
256
        result = db.execute(""" UPDATE todo SET time = %s WHERE indx \
256
257
= %s """, (ttime, todonr))