예제 #1
0
파일: template.py 프로젝트: gipi/Richie
    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)
예제 #2
0
파일: template.py 프로젝트: gipi/Richie
    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)
예제 #3
0
파일: ipython.py 프로젝트: seunboi4u/madcow
 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)
예제 #4
0
파일: ipython.py 프로젝트: Havvy/madcow
 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)