def reconnect(self): if mapserv.server is not None: mapserv.cleanup() net.login(host=config.get('Server', 'host'), port=config.getint('Server', 'port'), username=config.get('Player', 'username'), password=config.get('Player', 'password'), charname=config.get('Player', 'charname')) if hasattr(self, '_menu_popup'): self._menu_popup.dismiss()
def player_warp(data): mapserv.cmsg_map_loaded() @extends('smsg_map_login_success') def map_login_success(data): mapserv.cmsg_map_loaded() if __name__ == '__main__': logging.basicConfig(format="[%(asctime)s] %(message)s", level=logging.INFO, datefmt="%Y-%m-%d %H:%M:%S") config = ConfigParser() config.read('manachat.ini') load_itemdb('itemdb.txt') plugins.load_plugins(config) net.login(host=config.get('Server', 'host'), port=config.getint('Server', 'port'), username=config.get('Player', 'username'), password=config.get('Player', 'password'), charname=config.get('Player', 'charname')) try: asyncore.loop() except KeyboardInterrupt: mapserv.cleanup()
def on_stop(self): Clock.unschedule(self.update_loop) Clock.unschedule(self.update_online_list) mapserv.cleanup()