Someone changed their nickname - send the nicknames list to the
        WebSocket.
333219
def on_nick(self, connection, event):
        
        old_nickname = self.get_nickname(event)
        old_color = self.nicknames.pop(old_nickname)
        new_nickname = event.target()
        message = "is now known as %s" % new_nickname
        self.namespace.emit("message", old_nickname, message, old_color)
        new_color = color(new_nickname)
        self.nicknames[new_nickname] = new_color
        self.emit_nicknames()
        if self.nickname == old_nickname:
            self.nickname = new_nickname
1266107
def _update_proxy(self, change):
        
        if change['type'] == 'event':
            name = 'do_'+change['name']
            if hasattr(self.proxy, name):
                handler = getattr(self.proxy, name)
                handler()
        else:
            super(WebView, self)._update_proxy(change)
1178954
function(w, data) {
            return (w.senderToNameMap[data.id] || data.id) + ' ' +
                (data.collapsed ? 'mini' : 'maxi') + 'mized the chat';
        }
1148964
def rename_to_tmp_name(self):
        
        self.client.rename(
            self.id,
            '%s_%s' % (self.short_id, self.name)
        )
787791
def on_connect(client):
    """"""
    client.nick(client.user.nick)
    client.userinfo(client.user.username, client.user.realname)
1082916
public void refreshNames() {
        Message namesMessage = new Message(MessageType.NAMES, this.channelName);
        List<Message> response;

        try {
            response = connection.request(
                MessageFilters.message(MessageType.RPL_NAMREPLY, null, "=", channelName),
                MessageFilters.message(MessageType.RPL_ENDOFNAMES, null, channelName),
                namesMessage);
        } catch (InterruptedException e) {
            return;
        }

        List<String> names = new ArrayList<String>();

        for (Message message : response) {
            if (message.getType() == MessageType.RPL_NAMREPLY) {
                String[] args = message.getArgs();

                for (String name : args[args.length - 1].split(" ")) {
                    names.add(name.replaceFirst("^[@+]", ""));
                }
            }
        }

        this.names = names;
    }
765767
function MeetmeMute(meetme, usernum) {
   MeetmeMute.super_.call(this, 'MeetmeMute');
   this.set('Meetme', meetme);
   this.set('Usernum', usernum);
 }
280080
def set_name(self, name):
        
        self.name = name
        self.changed_event.emit(self)
569185
def change_username(self, username):
        
        username = username.lower()
        if self.username != username:
            if self.get_by_username(username):
                raise exceptions.AuthError("Username exists already")
            self.update(username=username)
886121
def change_profile(self, profile_name):
        """"""
        self._server_side_completer = self._create_server_side_completer(
            session=botocore.session.Session(profile=profile_name))
393906
def send_to_websocket(self, data):
        """"""
        data = json.dumps(data)
        self.websocket.send(data)
1065174
async def on_raw_401(self, message):
        
        nickname = message.params[1]

        # Remove nickname from whois requests if it involves one of ours.
        if nickname in self._pending['whois']:
            future = self._pending['whois'].pop(nickname)
            future.set_result(None)
            del self._whois_info[nickname]
845412
def rename(self, new_name):
        
        payload = {
            'new_name': new_name
        }
        data = json.dumps(payload)
        req = self.request(self.mist_client.uri+'/keys/'+self.id, data=data)
        req.put()
        self.id = new_name
        self.mist_client.update_keys()
363187
function transToValue(list) {
  return (list || []).map((item) => {
    const {
      emplId,
      nick,
      nickNameCn,
      name,
      orgUserName,
      avatar,
    } = item;

    const nickName = nick || nickNameCn;
    let label = '';
    if (nickName) {
      // 花名(工号)
      label = `${nickName}(${emplId})`;
    } else if (orgUserName) {
      // 姓名(工号)
      label = `${orgUserName}(${emplId})`;
    } else if (name) {
      // name = 姓名(花名)
      label = name;
    }

    return {
      key: emplId,
      label,
      avatar,
    };
  });
}
461019
def rename(name, new_name):
    '''
    
    '''
    current_info = info(name)
    if not current_info:
        raise CommandExecutionError('User \'{0}\' does not exist'.format(name))
    new_info = info(new_name)
    if new_info:
        raise CommandExecutionError(
            'User \'{0}\' already exists'.format(new_name)
        )
    _dscl(
        ['/Users/{0}'.format(name), 'RecordName', name, new_name],
        ctype='change'
    )
    # dscl buffers changes, sleep 1 second before checking if new value
    # matches desired value
    time.sleep(1)
    return info(new_name).get('RecordName') == new_name
770166
async def on_raw_433(self, message):
        
        if not self.registered:
            self._registration_attempts += 1
            # Attempt to set new nickname.
            if self._attempt_nicknames:
                await self.set_nickname(self._attempt_nicknames.pop(0))
            else:
                await self.set_nickname(
                    self._nicknames[0] + '_' * (self._registration_attempts - len(self._nicknames)))
959579
def on_join(self, connection, event):
        
        #from time import sleep; sleep(10)  # Simulate a slow connection
        nickname = self.get_nickname(event)
        nickname_color = color(nickname)
        self.nicknames[nickname] = nickname_color
        self.namespace.emit("join")
        self.namespace.emit("message", nickname, "joins", nickname_color)
        self.emit_nicknames()