mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 13:19:24 +01:00
Converted to commands.wrap. These are all untested, so someone should test them at some point.
This commit is contained in:
parent
5762ed6d74
commit
4a4a0915b7
@ -46,8 +46,8 @@ import time
|
|||||||
import supybot.log as log
|
import supybot.log as log
|
||||||
import supybot.conf as conf
|
import supybot.conf as conf
|
||||||
import supybot.utils as utils
|
import supybot.utils as utils
|
||||||
|
from supybot.commands import *
|
||||||
import supybot.ircutils as ircutils
|
import supybot.ircutils as ircutils
|
||||||
import supybot.privmsgs as privmsgs
|
|
||||||
import supybot.registry as registry
|
import supybot.registry as registry
|
||||||
import supybot.callbacks as callbacks
|
import supybot.callbacks as callbacks
|
||||||
|
|
||||||
@ -123,14 +123,13 @@ class Later(callbacks.Privmsg):
|
|||||||
self.wildcards.append(nick)
|
self.wildcards.append(nick)
|
||||||
self._flushNotes()
|
self._flushNotes()
|
||||||
|
|
||||||
def tell(self, irc, msg, args):
|
def tell(self, irc, msg, args, nick, text):
|
||||||
"""<nick> <text>
|
"""<nick> <text>
|
||||||
|
|
||||||
Tells <nick> <text> the next time <nick> is in seen. <nick> can
|
Tells <nick> <text> the next time <nick> is in seen. <nick> can
|
||||||
contain wildcard characters, and the first matching nick will be
|
contain wildcard characters, and the first matching nick will be
|
||||||
given the note.
|
given the note.
|
||||||
"""
|
"""
|
||||||
(nick, text) = privmsgs.getArgs(args, required=2)
|
|
||||||
if ircutils.strEqual(nick, irc.nick):
|
if ircutils.strEqual(nick, irc.nick):
|
||||||
irc.error('I can\'t send notes to myself.')
|
irc.error('I can\'t send notes to myself.')
|
||||||
return
|
return
|
||||||
@ -139,6 +138,7 @@ class Later(callbacks.Privmsg):
|
|||||||
irc.replySuccess()
|
irc.replySuccess()
|
||||||
except ValueError:
|
except ValueError:
|
||||||
irc.error('That person\'s message queue is already full.')
|
irc.error('That person\'s message queue is already full.')
|
||||||
|
tell = wrap(tell, ['nick', 'text'])
|
||||||
|
|
||||||
def doPrivmsg(self, irc, msg):
|
def doPrivmsg(self, irc, msg):
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user