'Handle WILL commands according to RF1143'

def _handle_will(self, opt):

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