File tree Expand file tree Collapse file tree 2 files changed +16
-7
lines changed Expand file tree Collapse file tree 2 files changed +16
-7
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ pub struct Controller {
3737 position : s2c:: Position ,
3838 last_action : i16 ,
3939 need_sync : bool ,
40- bypass_funtime : bool ,
40+ bypass : bool ,
4141}
4242
4343impl Controller {
@@ -48,7 +48,7 @@ impl Controller {
4848 remote_tx : Sender < RawPacket > ,
4949 event_rx : Receiver < Event > ,
5050 threshold : Option < i32 > ,
51- bypass_funtime : bool ,
51+ bypass : bool ,
5252 ) -> Self {
5353 Self {
5454 active_client,
@@ -69,7 +69,7 @@ impl Controller {
6969 } ,
7070 last_action : 0 ,
7171 need_sync : false ,
72- bypass_funtime ,
72+ bypass ,
7373 }
7474 }
7575 pub async fn run ( mut self ) {
@@ -113,11 +113,11 @@ impl Controller {
113113 }
114114 }
115115 }
116- if self . bypass_funtime {
116+ if self . bypass {
117117 if let Ok ( Some ( packet) ) = packet. try_uncompress ( self . threshold ) {
118118 if packet. packet_id . 0 == 0x07 {
119119 if let Ok ( t) = packet. convert :: < c2s:: Transaction > ( ) {
120- if t. action < - 500 {
120+ if t. action < 0 {
121121 if self . need_sync {
122122 println ! (
123123 "Синхронизация: {} -> {}" ,
Original file line number Diff line number Diff line change @@ -328,19 +328,28 @@ async fn handle_clients(
328328 let ( legit_tx, legit_rx) = mpsc:: channel ( 100 ) ;
329329 let ( remote_tx, remote_rx) = mpsc:: channel ( 100 ) ;
330330
331- let bypass_funtime = if remote_dns == "mc.funtime.su" {
331+ let bypass_servers = vec ! [ "mc.funtime.su" , "mc.holyworld.ru" ] ;
332+ let bypass = if bypass_servers
333+ . iter ( )
334+ . find ( |t : & & & str | remote_dns. eq ( * t) )
335+ . is_some ( )
336+ {
332337 true
333338 } else {
334339 false
335340 } ;
341+
342+ if bypass {
343+ println ! ( "[+] BYPASS Синхронизации" )
344+ }
336345 let controller = Controller :: new (
337346 ClientId :: C ,
338347 cheat_tx,
339348 legit_tx,
340349 remote_tx,
341350 event_rx,
342351 threshold,
343- bypass_funtime ,
352+ bypass ,
344353 ) ;
345354
346355 tokio:: spawn ( run_client (
You can’t perform that action at this time.
0 commit comments