def privmsg(self, user, channel, msg):
        user = user.split('!', 1)[0]

        # Check to see if they're sending me a private message
        if channel == self.nickname:
            msg = "Umm, let's talk in the main channel, shall we?"
            self.msg(user, msg)

        # Otherwise check to see if it is a message directed at me
        elif msg.startswith(self.nickname):
            response = ""
            m = [m for m in msg.split(' ') if m]
            command = m[1:]
            if len(command) > 2 and command[0] == "send":
                recipient = command[1]
                text = ' '.join(command[2:])
                self.factory.send_sms(recipient, text)
                response = "%s: ask %s to check for the message - '%s'." % (user, recipient, text)
            else:
                response = "%s? I'm just a bot... please be more specific." % (' '.join(command),)

            self.msg(channel, response)
dataset/ETHPy150Open SEL-Columbia/easygsm/opt/irc.py/IRCBot.privmsg/original