(self, network, channel)
Find (or create) a bot able to send to `channel` on `network`.
Find (or create) a bot able to send to `channel` on `network`.
Find ( or create ) a bot able to send to channel on network .
def find_bot_for_channel(self, network, channel):
        """
        Find (or create) a bot able to send to `channel` on `network`.
        """
        network_bots = self.find_bots_for_network(network)
        if not network_bots:
            # There aren't any bots currently active on this network,
            # so create one.
            return self._create_bot(network)

        # There are some bots already on this network, try to find
        # a free one, and if none are willing (ex: maximum channels)
        # create a new one.
        for bot in network_bots:
            if bot.will_join(channel):
                return bot
        else:
            return self._create_bot(network)
def find_bot_for_channel ( self , network , channel ) : network_bots = self . find_bots_for_network ( network ) if not network_bots : # There aren't any bots currently active on this network, # so create one. return self . _create_bot ( network ) # There are some bots already on this network, try to find # a free one, and if none are willing (ex: maximum channels) # create a new one. for bot in network_bots : if bot . will_join ( channel ) : return bot else : return self . _create_bot ( network )