Skip to content

Commit

Permalink
Add send() method for sending raw messages (closes #105)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnmaguire committed Feb 13, 2016
1 parent 5eae83b commit 02e0b4f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions cardinal/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,15 @@ def sendMsg(self, channel, message, length=None):
self.logger.info("Sending in %s: %s" % (channel, message))
self.msg(channel, message, length)

def send(self, message):
"""Send a raw message to the server.
Keyword arguments:
message -- Message to send.
"""
self.logger.info("Sending to server: %s" % message)
self.sendLine(message)

def disconnect(self, message=''):
"""Wrapper command to quit Cardinal.
Expand Down

0 comments on commit 02e0b4f

Please sign in to comment.