More refactoring! Break everything!

This commit is contained in:
Luke Rogers 2013-10-01 16:55:18 +13:00
parent 51c866de6d
commit 42a72f068e
6 changed files with 36 additions and 30 deletions

View file

@ -208,6 +208,12 @@ class IRC(object):
""" makes the bot send a message to a user """
self.cmd("PRIVMSG", [target, text])
def ctcp(self, target, ctcp_type, text):
""" makes the bot send a message to a user """
text = u"\x01{} {}\x01".format(ctcp_type, target)
self.cmd("PRIVMSG", [target, text])
def cmd(self, command, params=None):
if params:
params[-1] = ':' + params[-1]