def __init__(self, protocol):
        self.ttype_step = 0
        self.protocol = protocol
        self.protocol.protocol_flags['TTYPE'] = {"init_done": False}
        # is it a safe bet to assume ANSI is always supported?
        self.protocol.protocol_flags['TTYPE']['ANSI'] = True
        # setup protocol to handle ttype initialization and negotiation
        self.protocol.negotiationMap[TTYPE] = self.will_ttype
        # ask if client will ttype, connect callback if it does.
        self.protocol.do(TTYPE).addCallbacks(self.will_ttype, self.wont_ttype)
Replaces the token value with a session token from the auth server.
dataset/ETHPy150Open evennia/evennia/evennia/server/portal/ttype.py/Ttype.__init__--crossover with--dataset/ETHPy150Open acil-bwh/SlicerCIP/Scripted/attic/PicasaSnap/gdata/gauth.py/AuthSubToken._upgrade_token