Added reply and tweaked success.

This commit is contained in:
Jeremy Fincher 2004-04-30 06:12:20 +00:00
parent f9442d9483
commit cf54ef75cf
2 changed files with 19 additions and 3 deletions

View File

@ -1,3 +1,9 @@
* Added Utilities.reply for replying to a person with text. Like
echo, but it prepends the nick like the bot normally does.
* Changed Utilities.success to accept an option <text> argument
for text to be appended to the success message.
* Changed User.{addhostmask,removehostmask,register,unregister} * Changed User.{addhostmask,removehostmask,register,unregister}
to allow owner users to do what they will with their users. You to allow owner users to do what they will with their users. You
can now add hostmasks, remove hostmasks, register users, and can now add hostmasks, remove hostmasks, register users, and

View File

@ -55,15 +55,25 @@ class Utilities(callbacks.Privmsg):
""" """
pass pass
def reply(self, irc, msg, args):
"""<text>
Replies with <text>. Equivalent to the alias, 'echo $nick: $1'.
"""
text = privmsgs.getArgs(args)
irc.reply(text)
def success(self, irc, msg, args): def success(self, irc, msg, args):
"""requires no arguments """[<text>]
Does nothing except to reply with a success message. This is useful Does nothing except to reply with a success message. This is useful
when you want to run multiple commands as nested commands, and don't when you want to run multiple commands as nested commands, and don't
care about their output as long as they're successful. An error, of care about their output as long as they're successful. An error, of
course, will break out of this command. course, will break out of this command. <text>, if given, will be
appended to the end of the success message.
""" """
irc.replySuccess() text = privmsgs.getArgs(args)
irc.replySuccess(text)
def last(self, irc, msg, args): def last(self, irc, msg, args):
"""<text> [<text> ...] """<text> [<text> ...]