Beispiel #1
0
    def process_message(self, message, nick):
        """Create request object from recived message and process it"""

        # this object persists as it's processed by the bot subsystem.
        # if this requests generates a response, you will receive it along
        # with the response message in protocol_output(), which means you
        # can set arbitrary attributes and access them later, for example
        # a channel to send to for multi-channel protocols, etc.
        req = Request(message)

        # required for most modules
        req.nick = nick

        # some modules expect this to be set as well as logging facility
        req.channel = 'console'

        # force bot into addressed mode
        # many modules require the bot is addressed before triggering.
        req.addressed = True

        # this sets the above flag to true if the user addresses the bot,
        # as well as strips off the bots nick.
        self.checkAddressing(req)

        # pass to substem for final processing
        Madcow.process_message(self, req)
Beispiel #2
0
    def process_message(self, message, nick):
        """Create request object from recived message and process it"""

        # this object persists as it's processed by the bot subsystem.
        # if this requests generates a response, you will receive it along
        # with the response message in protocol_output(), which means you
        # can set arbitrary attributes and access them later, for example
        # a channel to send to for multi-channel protocols, etc.
        req = Request(message)

        # required for most modules
        req.nick = nick

        # some modules expect this to be set as well as logging facility
        req.channel = 'console'

        # force bot into addressed mode
        # many modules require the bot is addressed before triggering.
        req.addressed = True

        # this sets the above flag to true if the user addresses the bot,
        # as well as strips off the bots nick.
        self.checkAddressing(req)

        # pass to substem for final processing
        Madcow.process_message(self, req)
Beispiel #3
0
 def process_message(self, message):
     """Create request object from recived message and process it"""
     req = Request(message=message)
     req.nick = os.environ['USER']
     req.channel = 'ipython'
     req.addressed = True
     self.check_addressing(req)
     Madcow.process_message(self, req)
Beispiel #4
0
 def process_message(self, message):
     """Create request object from recived message and process it"""
     req = Request(message=message)
     req.nick = os.environ['USER']
     req.channel = 'ipython'
     req.addressed = True
     self.check_addressing(req)
     Madcow.process_message(self, req)