Ejemplo n.º 1
0
    def privmsg(self, client, user, channel, message):
        """ Recieves private messages, and says things if asked to. """

        destination = get_reply_destination(client, user, channel)
        message_info = message.split(' ', 1)

        if len(message_info) >= 2 and message_info[0].lower() == get_command_string('say'):
            client.msg(destination, message_info[1])
Ejemplo n.º 2
0
    def privmsg(self, client, user, channel, message):
        """ Recieves private messages, and quits things if asked to. """

        message_info = message.split(' ', 1)

        if len(message_info) >= 2:
            quit_message = message_info[1]
        else:
            quit_message = config.load('settings')['core']['default_quit_message'].encode('UTF-8')

        if message_info[0].lower() == get_command_string('quit'):
            client.quit(quit_message)