mirror of
https://github.com/jlu5/PyLink.git
synced 2024-12-24 03:33:10 +01:00
classes: add irc.error() for easier error replies
This commit is contained in:
parent
57f7acc124
commit
c450d71f84
@ -535,6 +535,12 @@ class Irc():
|
||||
|
||||
self.msg(target, text, notice=notice, source=source, loopback=loopback)
|
||||
|
||||
def error(self, text, notice=False, source=None, private=False, force_privmsg_in_private=False,
|
||||
loopback=True):
|
||||
"""Replies with an error to the last caller in the right context (channel or PM)."""
|
||||
# This is a stub to alias error to reply
|
||||
self.reply("Error: %s" % text, notice=notice, source=source, loopback=loopback)
|
||||
|
||||
def toLower(self, text):
|
||||
"""Returns a lowercase representation of text based on the IRC object's
|
||||
casemapping (rfc1459 or ascii)."""
|
||||
|
Loading…
Reference in New Issue
Block a user