code: def _nick(self, nick):
          
          with self.lock:
              self.send('NICK :%s' % nick)
  
              if self.readable():
                  msg = self._recv(expected_replies='NICK')
                  if msg[0] == 'NICK':
                      if not self.hide_called_events:
                          self.stepback()
  
              for channel in self.channels:
                  if 'USERS' in self.channels[channel]:
                      priv_level = \
                      self.channels[channel]['USERS'][self.current_nick]
                      del self.channels[channel]['USERS'][self.current_nick]
                      self.channels[channel]['USERS'][nick] = priv_level
              self.current_nick = nick
docs: Sets your nick.
          Required arguments:
          * nick - New nick.