code: def as_nick(self, name):
          
          orig = self.get_nickname()
          self.nick(name)
          try:
              yield orig
          finally:
              self.nick(orig)
docs: Set the nick for the duration of the context.