| #!/usr/bin/python  | 
| # -*- coding: GBK -*-  | 
|   | 
| ##@package GMTool_KickOut  | 
| # Êý¾Ý¿âGMÃüÁîÖ´ÐÐ->Ìß³öÍæ¼Ò  | 
| #  | 
| # @author wdb  | 
| # @date 2012-06-06 12:00  | 
| # @version 1.3  | 
| #  | 
| # ÐÞ¸Äʱ¼ä ÐÞ¸ÄÈË ÐÞ¸ÄÄÚÈÝ  | 
| #  | 
| # @change: "2012-06-14 18:00" wdb gm¹¤¾ßÔö¼Ó¹¦ÄÜ  | 
| # @change: "2012-07-12 18:00" wdb ×Ö·ûת»»ÔÚÈë¿Ú´¦Àí  | 
| # @change: "2012-08-10 15:00" zhangxi ÐÞ¸ÄOSS¼Ç¼  | 
| # Ä£¿éÏêϸ˵  | 
| #Êý¾Ý¿âGMÃüÁîÖ´ÐÐ->Ìß³öÍæ¼Ò  | 
| #---------------------------------------------------------------------  | 
| #µ¼Èë  | 
| import GMCommon  | 
| import GameWorld  | 
| import ChConfig  | 
| import IPY_GameServer  | 
| import DataRecordPack  | 
| #---------------------------------------------------------------------  | 
| #È«¾Ö±äÁ¿  | 
| #---------------------------------------------------------------------  | 
| VER = "2012-08-10 15:00"   | 
| #---------------------------------------------------------------------  | 
|   | 
| #Â߼ʵÏÖ(ÕâÀïcurPlayer = None)  | 
| ## Ö´ÐÐÂß¼  | 
| #  @param curPlayer µ±Ç°Íæ¼Ò  | 
| #  @param gmList [cmdIndex gmAccID type find]  | 
| #  @return None  | 
| #  @remarks º¯ÊýÏêϸ˵Ã÷.  | 
| def OnExec(orderId, gmCmdDict):  | 
|     # »ñµÃ²¢×ª»»×Ö·û´®  | 
|     playerName = gmCmdDict.get(GMCommon.Def_GMKey_PlayerName, '')  | 
|     playerAccID = gmCmdDict.get(GMCommon.Def_GMKey_PlayerAccID, '')  | 
|   | 
|     tagPlayer = None  | 
|     playerManager = GameWorld.GetPlayerManager()  | 
|     #Íæ¼ÒÕË»§  | 
|     if playerAccID != '':  | 
|         tagPlayer = playerManager.FindPlayerByAccID(str(playerAccID))  | 
|           | 
|     #Íæ¼ÒÃû³Æ  | 
|     elif playerName != '':  | 
|         tagPlayer = playerManager.FindPlayerByName(str(playerName))  | 
|           | 
|     if not tagPlayer:  | 
|         # »Ø¸´gm£¬Î´ÕÒµ½Íæ¼Ò  | 
|         GMCommon.GMCommandResult(orderId, gmCmdDict, GMCommon.Def_NoTag)  | 
|         return  | 
|       | 
|     playerID = tagPlayer.GetPlayerID()  | 
|     playerName = tagPlayer.GetName()  | 
|     tagPlayer.Kick(IPY_GameServer.disGMKick)  | 
|     #Ö´Ðгɹ¦  | 
|     GMCommon.GMCommandResult(orderId, gmCmdDict, GMCommon.Def_Success)      | 
|     # ¼Ç¼Á÷Ïò  | 
|     DataRecordPack.DR_ToolGMOperate(playerID, playerName, playerAccID, gmCmdDict.get(GMCommon.Def_GMKey_Type, ''))  | 
|     return  | 
|   |