File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -1472,15 +1472,21 @@ private void HandleEncodingIssue()
14721472 Task . Run ( async ( ) =>
14731473 {
14741474 getServerInfoLine = 102 ;
1475- autoStartserver . IsChecked = true ;
1475+ Dispatcher . Invoke ( ( ) =>
1476+ {
1477+ autoStartserver . IsChecked = true ;
1478+ } ) ;
14761479 await Task . Delay ( 200 ) ;
14771480 try
14781481 {
14791482 ServerProcess . Kill ( ) ;
14801483 }
14811484 catch { }
14821485 await Task . Delay ( 200 ) ;
1483- autoStartserver . IsChecked = false ;
1486+ Dispatcher . Invoke ( ( ) =>
1487+ {
1488+ autoStartserver . IsChecked = false ;
1489+ } ) ;
14841490 } ) ;
14851491 }
14861492 return true ;
@@ -1598,7 +1604,7 @@ private void GetServerInfoSys()
15981604 private void GetPlayerInfoSys ( string msg )
15991605 {
16001606 // 正则表达式提取用户名
1601- Regex loginRegex = new Regex ( @":\s*(\S+)\[/.*\] \s*logged in with entity id" ) ;
1607+ Regex loginRegex = new Regex ( @":\s*(\S+\[[^\]]+\]) \s*logged in with entity id" ) ;
16021608 Regex disconnectRegex = new Regex ( @":\s*(\S+)\s*lost connection:" ) ;
16031609 Regex serverDisconnectRegex = new Regex ( @":\s*(\S+)\s*与服务器失去连接" ) ;
16041610
You can’t perform that action at this time.
0 commit comments