1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
í³Ôdc@sddlZddlZddlZddlZddlTddlZdZdad„Z    e    edddƒZ
e    eddd    ƒZ e    edd
d    ƒZ e    edd d ƒZ e
Ge Ge GHd „Zd„Zd„Zd„Zd„Zd„Zd„ZedkreƒndS(iÿÿÿÿN(t*sClearLossPlayer.inicCstdkrItjƒaytj|ƒWqIdGHtjdƒ|SXntrútj||ƒrätj||ƒ}yGt|ƒt    kr£t|ƒt
|ƒƒ}nt|ƒ|ƒ}|SWqäd||fGHtjdƒ|SXnd|||fGH|Sd|GHtjdƒ|SdS(NsClearLossPlayer.ini Read Failtpasues*ReadConfig ClearLossPlayer.ini %s %s errors3ReadConfig file< %s >  (Section:%s, Section:%s) DefsReadConfig file< %s > Error( tcftNonet ConfigParsertreadtostsystemt
has_optiontgetttypetbooltint(tFilePathtSectiontOptiontDeftvalue((sB.\\ServersRoute\Tools\Tool_ClearLossPlayer\Tool_ClearLossPlayer.pyt
ReadConfigs2         tLimittPassTimeg>@tRechargeitGoldtLVicCs%tj|dƒ}tj|ƒ}|S(Ns%Y-%m-%d %H:%M:%S(ttimetstrptimetmktime(tstrTimet
TimeStructtSeconds((sB.\\ServersRoute\Tools\Tool_ClearLossPlayer\Tool_ClearLossPlayer.pytStringTimeToseconds9sc'Cs¨ |t}|t}|t}|t}|t}|t}|t}|t}    |t}
|t    } |t
} |t } |t }|t }|t}|t}|t}|t}|t}|t}|t}|t}|t}|t}|t}|t}|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ƒf7}|dt    | jƒjƒf7}|dt
| jƒjƒf7}|dt | jƒjƒf7}|dt |jƒjƒf7}|dt |jƒjƒf7}|dt|jƒjƒf7}|dt|jƒjƒf7}|dt|jƒjƒf7}|dt|jƒjƒf7}|dt|jƒjƒf7}|dt|jƒjƒf7}|dt|jƒjƒf7}|dt|jƒjƒf7}|dt|jƒjƒf7}|dt|jƒjƒf7}|dt|jƒjƒf7}|dt|jƒjƒf7}|dt|jƒjƒf7}|GHdGHdS(Ns BeforeDelete
s %s count=%d
s%Y-%m-%d %H:%M:%StPlayerIDtAccIDs title Delete LossPlayer count %ssDelete LossPlayer count %ss$intEnemyIDtFriendIDtACCIDsDelete LossPlayer Ends#####AfterDelete#####
s--------------End('tUCN_DBPlayerRecalltUCN_DBPlayerLabeltUCN_DBVsRewardtUCN_GameFBPassRectUCN_PlayerDienstgradtUCN_DBGoldOrderFormtUCN_DBOverdueGoldOrderFormtUCN_DBUnclaimedGoldFormt
UCN_GMOpert UCN_PetSkilltUCN_PlayerEnemytUCN_PlayerFriendtUCN_PlayerHorseTablet UCN_RoleBufftUCN_RoleMissiontUCN_RoleMissionDicttUCN_RoleNomalDictt UCN_RolePettUCN_RoleRepeatTimet UCN_RoleSkillt UCN_RoleItemtUCN_PetExpiationt UCN_ExpiationtUCN_AccIDSendPrizet UCN_AccCoinst UCN_DSAccountt UCN_DBPlayertfindtcountRt    localtimetstrftimeRtlenR    tappendRRtremove('tUserDBtLossPlayerListtcolDBPlayerRecalltcolDBPlayerLabelt colDBVsRewardtcolGameFBPassRectcolPlayerDienstgradtcolDBGoldOrderFormtcolDBOverdueGoldOrderFormtcolDBUnclaimedGoldFormt    colGMOpert colPetSkilltcolPlayerEnemytcolPlayerFriendtcolPlayerHorseTablet colRoleBufftcolRoleMissiontcolRoleMissionDicttcolRoleNomalDictt
colRolePettcolRoleRepeatTimet colRoleSkillt colRoleItemtcolPetExpiationt colExpiationtcolAccIDSendPrizet colAccCoinst colDSAccountt colDBPlayertStrt Start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|j#i|%d 6ƒ|j#i|%d6ƒ|"d 7}"tjƒ}&tj |&ƒ}'t$j%d |"|!|"d|!||'| fƒqºW|d7}|dt|jƒjƒf7}|dt|jƒjƒf7}|dt|jƒjƒf7}|dt|jƒjƒf7}|dt|jƒjƒf7}|dt|jƒjƒf7}|dt|jƒjƒf7}|dt|    jƒjƒf7}|dt|
jƒjƒf7}|dt    | jƒjƒf7}|dt
| jƒjƒf7}|dt | jƒjƒf7}|dt |jƒjƒf7}|dt |jƒjƒf7}|dt|jƒjƒf7}|dt|jƒjƒf7}|dt|jƒjƒf7}|dt|jƒjƒf7}|dt|jƒjƒf7}|dt|jƒjƒf7}|dt|jƒjƒf7}|dt|jƒjƒf7}|dt|jƒjƒf7}|dt|jƒjƒf7}|dt|jƒjƒf7}|dt|jƒjƒf7}|dt|jƒjƒf7}|GHdGHdS(Ns BeforeDelete
s %s count=%d
s%Y-%m-%d %H:%M:%SiRR s--------------sDeletePlayerID = %d,AccID = %sR!R"R#is<title ClearLossPlayer    %d/%d  %0.2f%%    StartTime:%s--%dsgY@s#####AfterDelete#####
s--------------End(&R$R%R&R'R(R)R*R+R,R-R.R/R0R1R2R3R4R5R6R7R8R9R:R;R<R=R>R?R@RRARBRRCR    RERR((RFRGRHRIRJRKRLRMRNRORPRQRRRSRTRURVRWRXRYRZR[R\R]R^R_R`RaRbRcRdReRfRgt CompleteCountRjRR t curTimeListtcurTime((sB.\\ServersRoute\Tools\Tool_ClearLossPlayer\Tool_ClearLossPlayer.pytClearAllLossPlayerInfoLs
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
                              
 0
                           cCsp|jƒ}t|krtS|t}|ji|d6ƒ}x-|D]%}|jdƒ}||krCtSqCWtS(NtIDtLeaderID(tcollection_namestUCN_FamilyInfotFalseR?R    tTrue(RFtFamilyIDRtcolNamest colFamilyInfotFamilyst
FamilyInfoRq((sB.\\ServersRoute\Tools\Tool_ClearLossPlayer\Tool_ClearLossPlayer.pytIsPlayerFamilyLeaderüs  
  cCsÙ|jƒ}t|kr%dtGHdStjƒ}tjd|ƒ}tj|ƒ}d||fGdGHg}|t}|jiitd6d6it    d6d6it
d6d6d    d
6d d 6d d 6ƒ}|jiitd6d6it    d6d6it
d6d6dd
6d d 6d d 6ƒ}|j ƒ|j ƒ}    d }
tjƒ} xK|D]C} | j dƒ} t tjƒ| |    |
td    |
ƒƒ}tjd|
|    |
d|    || fƒ|
d    7}
| j dƒ}d }|rèt|ƒ}t|ƒ}n| j dƒ}d }|rt|ƒ}t|ƒ}n|t||ƒ}|dddtkrOq@n| j dƒ}t||| ƒrvq@n|j| ƒq@WxK|D]C} | j dƒ} t tjƒ| |    |
td    |
ƒƒ}tjd|
|    |
d|    || fƒ|
d    7}
| j dƒ}d }|r6t|ƒ}t|ƒ}n| j dƒ}d }|rlt|ƒ}t|ƒ}n|t||ƒ}|dddtkrqŽn| j dƒ}t||| ƒrÄqŽn|j| ƒqŽW|S(NsCollection name:%s not found!s%Y-%m-%d %H:%M:%SsLocalTime:    %s (seconds=%s) s
s$lteRtChangeCoinPointTotalRitAccStateitGMLevelt    IsDeletediRs<title CheckLossPlayer %d/%d(%0.2f%%) RemainTime %ss -- ID:%dgY@t
LogoffTimet    LoginTimei<iRv(RrR>RRRARBRR?tLimit_LVtLimit_Recharget
Limit_GoldR@R    R tmaxRRtstrRtLimit_PassTimeR{RD(RFRwt localtimeListt localtimeStrRARGRbtUnderLimitPlayerstUnderLimitPlayers1RgRlt    startTimeRjRt
remainTimetvalue_LogoffTimet curLogoffTimetcurLogoffTimeStrtvalue_LoginTimet curLoginTimetcurLoginTimeStrt passSecondsRv((sB.\\ServersRoute\Tools\Tool_ClearLossPlayer\Tool_ClearLossPlayer.pytFindLossPlayer sŒ       
    +(
   +(
  cCs›tjƒ}tjd|ƒ}tj|ƒ}d||fGdGH|t}|t}|jiƒ}g}dGH|jƒ}d}    tjƒ}
x´|D]¬} | d} |ji| d6ƒ} ttjƒ|
||    t    d|    ƒƒ}t
j d    |    ||    d
||| fƒ| jƒr(|    d7}    q“n|j | ƒ|    d7}    q“Wd}    t |ƒ}t
j d |ƒd |GH|jii|d 6d6ƒt
j dƒdS(Ns%Y-%m-%d %H:%M:%SsLocalTime:    %s (seconds=%s) s
sFinding emptyAcc...iR#R is2title CheckACC %d/%d(%0.2f%%) RemainTime %ss -- %sgY@stitle DelEmptyACC Count %ssDelete emptyAcc count = %ss$institle  DelEmptyACC OK(RRARBRR>R=R?R@R R…RRRDRCRE(RFRˆR‰RARbtcolDBAcctaccListt emptyAccListRgRlRŒtrectaccidt
playerListR((sB.\\ServersRoute\Tools\Tool_ClearLossPlayer\Tool_ClearLossPlayer.pytClearEmptyPlayerAcczs: 
 
 
+( 
       c CsØd}d}d}d}d}ttjƒdkr•tjdjƒ}tjdjƒ}tjdjƒ}tjdjƒ}tjdjƒ}ngttjƒdkrætjdjƒ}tjdjƒ}tjdjƒ}nd    GHtjd
ƒdSyt|ƒ}Wnd |GHtjd
ƒdSXd GHyWtj||ƒ}|j    }|j
||ƒsˆd ||||fGHtjd
ƒdSWn*d||||fGHtjd
ƒdSXy||}Wnd|GHtjd
ƒdSXdGHt |ƒt |ƒ}|dkr&dGdGHtjd
ƒdSdGHdt|ƒGHtjƒ}    tjd|    ƒ}
tj|    ƒ} d|
| fGdGHt||ƒtjƒ}    tjd|    ƒ}
tj|    ƒ} d|
| fGdGHtjd
ƒdS(Ntiiiiiiisarg count error!tpausesarg port type error!port = %ssconnect MongoDB...s+MongoDB %s:%s@%s:%s authentication failed!
s%s:%s@%s:%s login failed!s#UserDBName < %s >connection failed!sconnect MongoDB OKsFind No LossPlayers
s--------------sLossPlayerCount = %ds%Y-%m-%d %H:%M:%SsLocalTime:    %s (seconds=%s) (RCtsystargvtstripRRR tpymongot
Connectiontadmint authenticateRœR•RRRARBRRk( tiptporttusertpswt
UserDBNamet
connectiontdbRFRGRˆR‰RA((sB.\\ServersRoute\Tools\Tool_ClearLossPlayer\Tool_ClearLossPlayer.pytmain¥sz                 
          t__main__(RŸRR¢RtCollectionDefineRt Ini_FilePathRRRR‡RƒR„R‚RRkRoR{R•RœR­t__name__(((sB.\\ServersRoute\Tools\Tool_ClearLossPlayer\Tool_ClearLossPlayer.pyt<module>s,    
          ƒ        °        n    +    L