'Send the names of a channel\'s participants to a user.
@type user: C{str} or C{unicode}
@param user: The user receiving the name list.  Only their nickname,
not the full hostmask.
@type channel: C{str} or C{unicode}
@param channel: The channel for which this is the namelist.
@type names: C{list} of C{str} or C{unicode}
@param names: The names to send.'

def names(self, user, channel, names):

    prefixLength = ((len(channel) + len(user)) + 10)
    namesLength = (512 - prefixLength)
    L = []
    count = 0
    for n in names:
        if (((count + len(n)) + 1) > namesLength):
            self.sendLine((':%s    %s    %s    =    %s    :%s' % (self.hostname, RPL_NAMREPLY, user, channel, '    '.join(L))))
            L = [n]
            count = len(n)
        else:
            L.append(n)
            count += (len(n) + 1)
    if L:
        self.sendLine((':%s    %s    %s    =    %s    :%s' % (self.hostname, RPL_NAMREPLY, user, channel, '    '.join(L))))
    self.sendLine((':%s    %s    %s    %s    :End    of    /NAMES    list' % (self.hostname, RPL_ENDOFNAMES, user, channel)))
