@@ -73,8 +73,10 @@ export class CrimeLogCreatedHandler
73
73
) ,
74
74
)
75
75
. then ( ( proms ) => {
76
- this . logger . log ( `Initial cathing up in crimes finished, ${ proms . length } crimes handled` )
77
- } )
76
+ this . logger . log (
77
+ `Initial cathing up in crimes finished, ${ proms . length } crimes handled` ,
78
+ ) ;
79
+ } ) ;
78
80
}
79
81
80
82
async handle ( event : CrimeLogCreatedEvent ) {
@@ -87,7 +89,11 @@ export class CrimeLogCreatedHandler
87
89
if ( ! thisCrime ) return ;
88
90
89
91
// We don't punish for crimes in bots
90
- if ( thisCrime . lobby_type === MatchmakingMode . BOTS || thisCrime . lobby_type === MatchmakingMode . LOBBY ) {
92
+ if (
93
+ thisCrime . lobby_type === MatchmakingMode . BOTS ||
94
+ thisCrime . lobby_type === MatchmakingMode . LOBBY ||
95
+ thisCrime . lobby_type == MatchmakingMode . SOLOMID
96
+ ) {
91
97
thisCrime . handled = true ;
92
98
thisCrime . banTime = 0 ;
93
99
await this . playerCrimeLogEntityRepository . save ( thisCrime ) ;
@@ -103,17 +109,17 @@ export class CrimeLogCreatedHandler
103
109
104
110
const cumInterval = getPunishmentCumulativeInterval ( thisCrime . crime ) ;
105
111
106
- this . logger . log ( `Cumulative interval for crime is ${ cumInterval } ` )
112
+ this . logger . log ( `Cumulative interval for crime is ${ cumInterval } ` ) ;
107
113
108
114
const frequentCrimesCount = await this . playerCrimeLogEntityRepository
109
115
. createQueryBuilder ( "pc" )
110
116
. select ( )
111
117
. where ( "pc.steam_id = :sid" , { sid : thisCrime . steam_id } )
112
118
. andWhere ( `pc.created_at >= now() - :cum_interval::interval` , {
113
- cum_interval : cumInterval
119
+ cum_interval : cumInterval ,
114
120
} ) // interval here
115
121
. andWhere ( {
116
- handled : true
122
+ handled : true ,
117
123
} )
118
124
. andWhere ( `pc."banTime" > 0` )
119
125
. getMany ( ) ;
0 commit comments