'Handle WONT commands according to RF1143 (mostly)'

def _handle_wont(self, opt):

    if (self.him[opt] == NO):
        pass
    elif (self.him[opt] == YES):
        if self._can_he_disable(opt):
            self.him[opt] = NO
            self.send_dont(opt)
            self._notify_him(opt, False)
        else:
            self.send_do(opt)
    elif (self.him[opt] == WANTNO):
        if (self.himq[opt] == EMPTY):
            self.him[opt] = NO
        elif (self.himq[opt] == OPPOSITE):
            self.him[opt] = WANTYES
            self.himq[opt] = EMPTY
            self.send_do(opt)
    elif (self.him[opt] == WANTYES):
        if (self.himq[opt] == EMPTY):
            self.him[opt] = NO
        elif (self.himq[opt] == OPPOSITE):
            self.him[opt] = NO
            self.himq[opt] = EMPTY
