@classmethod
def from_real_name(cls, real_name, source):
    """Real name is a real name as on IRC, such as

            "erbium1.sytes.net v1.0 s t"

        Returns an instance of this Peer class.
        """
    host = 'nohost'
    features = {}
    ports = {}
    for n, part in enumerate(real_name.split()):
        if n == 0:
            host = part
            continue
        if part[0] in ('s', 't'):
            if len(part) == 1:
                port = cls.DEFAULT_PORTS[part[0]]
            else:
                port = part[1:]
            if part[0] == 's':
                ports['ssl_port'] = port
            else:
                ports['tcp_port'] = port
        elif part[0] == 'v':
            features['protocol_max'] = features['protocol_min'] = part[1:]
        elif part[0] == 'p':
            features['pruning'] = part[1:]
    features.update(ports)
    features['hosts'] = {host: ports}
    return cls(host, features, source)
