'For the given C{person}, change the C{person}\'s C{name} to C{newnick}
and tell the contact list and any conversation windows with that
C{person} to change as well.
@type person: L{IPerson<interfaces.IPerson>} provider
@param person: The person whose nickname will get changed.
@type newnick: C{str}
@param newnick: The new C{name} C{person} will take.'

def contactChangedNick(self, person, newnick):

    oldnick = person.name
    if ((oldnick, person.account) in self.persons):
        conv = self.conversations.get(person)
        if conv:
            conv.contactChangedNick(person, newnick)
        self.contactsList.contactChangedNick(person, newnick)
        del self.persons[(oldnick, person.account)]
        person.name = newnick
        self.persons[(person.name, person.account)] = person
