(self, channel)
return True
Returns True if this bot can join this channel.
Returns True if this bot can join this channel.
Returns True if this bot can join this channel .
def will_join(self, channel):
        """
        Returns True if this bot can join this channel.
        """
        prefix = channel.channel[0]
        # Maximum number of channels for channels with this prefix.
        channel_limit = self._isupport[1].get('CHANLIMIT', {}).get(prefix, 20)

        # Find all the channels we're already in with this prefix.
        channels = [c for c in self._channels if c[0] == prefix]
        if len(channels) >= channel_limit:
            return False

        return True
def will_join ( self , channel ) : prefix = channel . channel [ 0 ] # Maximum number of channels for channels with this prefix. channel_limit = self . _isupport [ 1 ] . get ( 'CHANLIMIT' , { } ) . get ( prefix , 20 ) # Find all the channels we're already in with this prefix. channels = [ c for c in self . _channels if c [ 0 ] == prefix ] if len ( channels ) >= channel_limit : return False return True