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() self.sending.release()
def action(self, recipient, text): def action(self, recipient, text):
text = "ACTION %s" % text text = "\x01ACTION {0}\x01".format(text)
textu = chr(1) + text + chr(1) return self.msg(recipient, text)
return self.msg(recipient, textu)
def notice(self, dest, text): def notice(self, dest, text):
self.write(('NOTICE', dest), text) self.write(('NOTICE', dest), text)