Added Later.remove.

This commit is contained in:
Jeremy Fincher 2007-10-23 03:33:50 +00:00 committed by James Vega
parent 7f7fd4d2c5
commit 479c11e71b

View File

@ -113,7 +113,7 @@ class Later(callbacks.Plugin):
irc.replySuccess()
except ValueError:
irc.error('That person\'s message queue is already full.')
tell = wrap(tell, ['nick', 'text'])
tell = wrap(tell, ['something', 'text'])
def notes(self, irc, msg, args, nick):
"""[<nick>]
@ -138,6 +138,19 @@ class Later(callbacks.Plugin):
irc.error('I have no notes waiting to be delivered.')
notes = wrap(notes, [additional('something')])
def remove(self, irc, msg, args, nick):
"""<nick>
Removes the notes waiting on <nick>.
"""
try:
del self._notes[nick]
self._flushNotes()
irc.replySuccess()
except KeyError:
irc.error('There were no notes for %r' % nick)
remove = wrap(remove, [('checkCapability', 'admin'), 'something'])
def doPrivmsg(self, irc, msg):
notes = self._notes.pop(msg.nick, [])
# Let's try wildcards.