Identify to NickServ (legacy).
778890
def nickserv_identify(self, password, use_nick=None):
        """"""
        if self.ready:
            if use_nick:
                self.msg(use_nick, 'IDENTIFY {}'.format(password))
            else:
                self.send('NICKSERV', params=['IDENTIFY', password])
        else:
            self.connect_info['nickserv'] = {
                'password': password,
                'use_nick': use_nick,
            }
251587
def retrieveAcknowledge():
    """"""
    a = TpPd(pd=0x3)
    b = MessageType(mesType=0x1d)  # 00011101
    packet = a / b
    return packet
1172042
def cli(env, identifier):
    """"""

    nw_mgr = SoftLayer.NetworkManager(env.client)
    result = nw_mgr.get_nas_credentials(identifier)
    table = formatting.Table(['username', 'password'])
    table.add_row([result.get('username', 'None'),
                   result.get('password', 'None')])
    env.fout(table)
373771
def change_nick(self, new_nick):
        """"""

        if self.logged_in:
            raise RuntimeError("User must be logged out")
        self.__verify_username(new_nick)

        self.conn.make_call("command", self.nick, "nick", new_nick)
        self.nick = new_nick
442800
function NickservMiddleware() {
	return function(client, raw_events, parsed_events) {
		raw_events.use(theMiddleware);
	};


	function theMiddleware(command, event, client, next) {
		if (command === '005') {
			if (client.options.nickserv) {
				var options = client.options.nickserv;
				client.say('nickserv', 'identify ' + options.account + ' ' + options.password);
			}
		}

		if (command === 'PRIVMSG' && event.params[0].toLowerCase() === 'nickserv') {
			// Handle success/retries/failures
		}

		next();
	}
}
732988
def change_nick(self, nick):
        """"""
        
        old_nick = self.nick
        self.nick = IRCstr(nick)
        
        for c in self.channels:
            c.users.remove(old_nick)
            c.users.add(self.nick)
156502
def distinguish(self, how=True):
        
        return self._reddit.distinguish(self.name, how=how)
1039138
def identified(self, res):
        ''''''
        # If they support it, they should give us a JSON blob which we should
        # inspect.
        try:
            res.data = json.loads(res.data)
            self._identify_response = res.data
            logger.info('Got identify response: %s', res.data)
        except:
            logger.warn('Server does not support feature negotiation')
            self._identify_response = {}

        # Save our max ready count unless it's not provided
        self.max_rdy_count = self._identify_response.get(
            'max_rdy_count', self.max_rdy_count)
        if self._identify_options.get('tls_v1', False):
            if not self._identify_response.get('tls_v1', False):
                raise UnsupportedException(
                    'NSQd instance does not support TLS')
            else:
                self._socket = TLSSocket.wrap_socket(self._socket)

        # Now is the appropriate time to send auth
        if self._identify_response.get('auth_required', False):
            if not self._auth_secret:
                raise UnsupportedException(
                    'Auth required but not provided')
            else:
                self.auth(self._auth_secret)
                # If we're not talking over TLS, warn the user
                if not self._identify_response.get('tls_v1', False):
                    logger.warn('Using AUTH without TLS')
        elif self._auth_secret:
            logger.warn('Authentication secret provided but not required')
        return res
715198
def human_repr(self):
        """"""

        return urlunsplit(
            SplitResult(
                self.scheme,
                self._make_netloc(
                    self.user, self.password, self.host, self._val.port, encode=False
                ),
                self.path,
                self.query_string,
                self.fragment,
            )
        )
1226653
def iter_user_identities(user):
    """"""
    from indico_vc_vidyo.plugin import VidyoPlugin
    providers = authenticators_re.split(VidyoPlugin.settings.get('authenticators'))
    done = set()
    for provider in providers:
        for _, identifier in user.iter_identifiers(check_providers=True, providers={provider}):
            if identifier in done:
                continue
            done.add(identifier)
            yield identifier
371883
def FlowResponseForLegacyResponse(legacy_msg):
  """"""
  if legacy_msg.type == legacy_msg.Type.MESSAGE:
    response = FlowResponse(
        client_id=_ClientIDFromSessionID(legacy_msg.session_id),
        flow_id=legacy_msg.session_id.Basename(),
        request_id=legacy_msg.request_id,
        response_id=legacy_msg.response_id,
        payload=legacy_msg.payload)
  elif legacy_msg.type == legacy_msg.Type.STATUS:
    legacy_status = legacy_msg.payload
    if legacy_status.status not in status_map:
      raise ValueError("Unable to convert returned status: %s" %
                       legacy_status.status)
    response = FlowStatus(
        client_id=_ClientIDFromSessionID(legacy_msg.session_id),
        flow_id=legacy_msg.session_id.Basename(),
        request_id=legacy_msg.request_id,
        response_id=legacy_msg.response_id,
        status=status_map[legacy_status.status],
        error_message=legacy_status.error_message,
        backtrace=legacy_status.backtrace,
        cpu_time_used=legacy_status.cpu_time_used,
        network_bytes_sent=legacy_status.network_bytes_sent)
  elif legacy_msg.type == legacy_msg.Type.ITERATOR:
    response = FlowIterator(
        client_id=_ClientIDFromSessionID(legacy_msg.session_id),
        flow_id=legacy_msg.session_id.Basename(),
        request_id=legacy_msg.request_id,
        response_id=legacy_msg.response_id)
  else:
    raise ValueError("Unknown message type: %d" % legacy_msg.type)

  return response
787791
def on_connect(client):
    """"""
    client.nick(client.user.nick)
    client.userinfo(client.user.username, client.user.realname)
1223575
async def on_raw_318(self, message):
        
        target, nickname = message.params[:2]

        # Mark future as done.
        if nickname in self._pending['whois']:
            future = self._pending['whois'].pop(nickname)
            future.set_result(self._whois_info[nickname])
373453
private static Node checkFollowedIdentifier(
			final HttpServletRequest request,
			final DeleteFollowResponse response) {
		final String followedId = request
				.getParameter(ProtocolConstants.Parameters.Delete.Follow.FOLLOWED_IDENTIFIER);
		if (followedId != null) {
			final Node followed = NeoUtils.getUserByIdentifier(followedId);
			if (followed != null) {
				return followed;
			}
			response.followedIdentifierInvalid(followedId);
		} else {
			response.followedIdentifierMissing();
		}

		return null;
	}
371384
def on_privmsg(self, connection, event):
        
        sender = self.get_nick(event.source)
        message = event.arguments[0]
        
        if sender == 'NickServ':
            logging.info("Got message from NickServ: %s", message)
            if "password" in message.lower():
                connection.privmsg("NickServ", "pass")
            else:
                connection.join('#cohorte')
            
            return

        self.handle_message(connection, sender, sender, message)
249719
function legacyify(record) {
    var clone = record.clone();
    clone.isUnique = false;
    clone.ttl = 10;
    return clone;
  }
523000
def on_welcome(self, c, e):
        
        self.backoff = 1  # Assume we had a good connection. Reset backoff.
        if self.nickserv:
            if Utilities.isNotEmpty(self.nickserv_pass):
                self.identify(c, e, self.nickserv_pass)
                time.sleep(3)  # Make sure Nickserv really sees us
            else:
                logger.error('If nickserv is enabled, you must supply'
                             ' a password')

        if self.nickserv is False and self.nickserv_pass is not None:
            logger.warn('It appears you provided a nickserv password but '
                        'did not enable nickserv authentication')

        for channel in self.my_channels:
            logger.debug('Attempting to join {0!s}'.format(channel))
            c.join(channel)