Skip to content
This repository has been archived by the owner on Aug 22, 2023. It is now read-only.

Commit

Permalink
Indev 3.6
Browse files Browse the repository at this point in the history
修复关闭隧道总是显示”该隧道已离线“的 Bug
2023 / 1 / 22
  • Loading branch information
Zhiyuan36 authored Jan 22, 2023
1 parent 0ea388d commit f520078
Showing 1 changed file with 18 additions and 8 deletions.
26 changes: 18 additions & 8 deletions LoCyanFrpMSApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1436,9 +1436,25 @@ inline void End() // 关闭映射模块
return;
}
print("正在关闭中...", 52, 52);
if (ifOnline(id)) // 离线
if (!ifOnline(id)) // 离线
{
print("该隧道已离线!", 51, 52);
Tunnel[FromIDFindTTunnelLen(id)].online = false;
int j = 0;
for (int i = 0; i < OnlineLen; i++) {
if (Online[i] != id)
{
Online[j++] = Online[i];
}
}
OnlineLen--;
fout.open("OnlineTunnel.list"); // 打开文件
fout << OnlineLen << '\n'; // 获取是否登录
for (int i = 0; i < OnlineLen; i++)
{
fout << Online[i] << " ";
}
fin.close();
Sleep(2000);
system("cls");
return;
Expand Down Expand Up @@ -1539,15 +1555,9 @@ inline void Unlogin() // 退出登录模块
cout << "|\n|";
Cout(117, ' ');
cout << "|\n|";
Cout(117, ' ');
cout << "|\n";
Cout(119, '-');
Sleep(2000);
HANDLE hout;
COORD coord = { 45 , 3 };
hout = GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleCursorPosition(hout, coord);
system("del /f /s /q AppLogin.dll"); // 把登陆文件删了
system("del /f /s /q AppLogin.dll>nul"); // 把登陆文件删了
ifLogin = false; // 不要忘记再把变量清了
system("cls");
return;
Expand Down

0 comments on commit f520078

Please sign in to comment.