

def mode_init(self, request):
    '\n        This is called by render_POST when the client requests an init\n        mode operation (at startup)\n\n        Args:\n            request (Request): Incoming request.\n\n        '
    suid = request.args.get('suid', ['0'])[0]
    remote_addr = request.getClientIP()
    host_string = ('%s (%s:%s)' % (SERVERNAME, request.getRequestHostname(), request.getHost().port))
    if (suid == '0'):
        suid = md5(str(time.time())).hexdigest()
        self.databuffer[suid] = []
        sess = WebClientSession()
        sess.client = self
        sess.init_session('webclient', remote_addr, self.sessionhandler)
        sess.suid = suid
        sess.sessionhandler.connect(sess)
    return jsonify({
        'msg': host_string,
        'suid': suid,
    })

dataset/ETHPy150Open evennia/evennia/evennia/server/portal/webclient.py WebClient.mode_init/original