def logout(self, e): client.make_reg_false() result = dialog.dispQuestion('Do you want to logout?', 'Logut') if result: client.logout() # dialog.dispInformationMsg('Sucessfully Logout') self.addDefaultPanel(None)
def main(): log.message("Starting IGE - Outer Space Messager Client version", Ver.versionString) log.debug("sys.path =", sys.path) log.debug("os.name =", os.name) # create required directories if not os.path.exists('var'): os.mkdir('var') # parse configuration gdata.config = Config('var/osci.ini') # default configuration if gdata.config.game.server == None: gdata.config.game.server = 'www.ospace.net:9080' # prepare internationalization if gdata.config.client.language == None: gdata.config.client.language = 'en' language = gdata.config.client.language import gettext try: tran = gettext.translation('OSPACE', 'res', languages=[language]) except IOError: log.warning('OSCI', 'Cannot find catalog for', language) log.message('OSCI', 'Installing null translations') tran = gettext.NullTranslations() tran.install(unicode=1) log.message('OSCI', 'Translations installed for %s languaage' % language) # client from igeclient.IClient import IClientException client.initialize(gdata.config.game.server, handler) app = App(False) app.MainLoop() # write configuration log.debug("Saving configuration.") gdata.config.save('var/osci.ini') # logout client.logout() log.debug("Shut down")
def main(): log.message("Starting IGE - Outer Space Messager Client version", Ver.versionString) log.debug("sys.path =", sys.path) log.debug("os.name =", os.name) # create required directories if not os.path.exists('var'): os.mkdir('var') # parse configuration gdata.config = Config('var/osci.ini') # default configuration if gdata.config.game.server == None: gdata.config.game.server = 'www.ospace.net:9080' # prepare internationalization if gdata.config.client.language == None: gdata.config.client.language = 'en' language = gdata.config.client.language import gettext try: tran = gettext.translation('OSPACE', 'res', languages = [language]) except IOError: log.warning('OSCI', 'Cannot find catalog for', language) log.message('OSCI', 'Installing null translations') tran = gettext.NullTranslations() tran.install(unicode = 1) log.message('OSCI', 'Translations installed for %s languaage' % language) # client from igeclient.IClient import IClientException client.initialize(gdata.config.game.server, handler) app = App(False) app.MainLoop() # write configuration log.debug("Saving configuration.") gdata.config.save('var/osci.ini') # logout client.logout() log.debug("Shut down")
client.connect(server_ip, client_ip, tcp_port, udp_port) connected = True elif option == 2: user = str(input('Ingrese su usuario: ')) if "invalid" in client.authenticate(user): user = None elif option == 3: msg = client.req_msg() msg_decoded = base64.b64decode(msg) user_msg = msg_decoded.decode('utf-8') print('El mensaje recibido es:', user_msg) elif option == 4: client.req_msg_length() elif option == 5: if msg_decoded: client.validate_msg(msg_decoded) else: print('Primero debe solicitar el mensaje al servidor') elif option == 6: client.logout() client.disconnect() connected = False user = None msg_decoded = None print('') menu() print('') option = int(input('Marque la opción que desee: ')) print('¡Hasta luego!')
def logout(clients, params): for client in clients: client.logout() sys.exit(0)
del fh else: break # write configuration log.debug("Saving configuration.") # Save highlights hl = "" for playerID in gdata.playersHighlightColors.keys(): color = gdata.playersHighlightColors[playerID] r = hex(color[0]) g = hex(color[1]) b = hex(color[2]) hl = "%s %s:%s,%s,%s" % (hl,playerID,r,g,b) gdata.config.defaults.colors = hl # Save objects of = "" for keyNum in gdata.objectFocus.keys(): objid = gdata.objectFocus[keyNum] of = "%s %s:%s" % (of,keyNum,objid) gdata.config.defaults.objectkeys = of # if gdata.savePassword == False: gdata.config.game.lastpasswordcrypted = None gdata.config.save() # logout client.logout() log.debug("Shut down")
def logout(self): client.logout(self.master.client) self.master.switch_frame(StartPage)
def logout(client, params): client.logout() sys.exit(0)