clean up action method in irc.py

master
mutantmonkey 2012-05-30 22:56:53 -07:00
parent 1d461a8484
commit 74713798f9
1 changed files with 2 additions and 3 deletions

5
irc.py
View File

@ -200,9 +200,8 @@ class Bot(asynchat.async_chat):
self.sending.release()
def action(self, recipient, text):
text = "ACTION %s" % text
textu = chr(1) + text + chr(1)
return self.msg(recipient, textu)
text = "\x01ACTION {0}\x01".format(text)
return self.msg(recipient, text)
def notice(self, dest, text):
self.write(('NOTICE', dest), text)