示例#1
0
文件: admin.py 项目: chekwind/Soccer
def operagamer_99(pid,opera_str):
	'''执行后台管理脚本'''
	gamer=GamersManager().getGamerByID(pid)
	isOline=1
	if not gamer:
		gamer=GamerCharacter(pid)
		isOline=0
	exec(opera_str)
	if isOline==0:
		gamer.updateGamerDBInfo()
示例#2
0
def NetConnLost_2(dynamicId):
	'''loginout
	'''
	gamer=GamersManager().getGamerBydynamicId(dynamicId)
	if not gamer:
		return True
	try:
		gamer.updateGamerDBInfo()
		GamersManager().dropGamer(gamer)
		gamer.playerInner.dbupdate()
	except Exception as ex:
		log.err(ex)
	finally:
		return 	True