更新README

This commit is contained in:
小白猿
2023-06-09 18:53:57 +08:00
parent 3c4b592479
commit 47feee5013
2 changed files with 17 additions and 2 deletions
+10 -1
View File
@@ -362,13 +362,19 @@ namespace BarrageGrab
}
}
static int count = 0;
private void Print(string msg, ConsoleColor color, BarrageMsgType bartype)
{
if (!Appsetting.PrintFilter.Any(a => a == bartype.GetHashCode())) return;
if (Appsetting.PrintBarrage)
{
if (++count > 1000)
{
Console.Clear();
Console.WriteLine("控制台已清理");
}
console.WriteLine($"{DateTime.Now.ToString("HH:mm:ss")} [{bartype.ToString()}] " + msg + "\n", color);
count = 0;
}
}
@@ -417,6 +423,9 @@ namespace BarrageGrab
var socket = user.Value;
socket.Socket.Send(msg);
}
//删除掉线的套接字
var offlines = socketList.Where(w=>!w.Value.Socket.IsAvailable).Select(s=>s.Key).ToList();
offlines.ForEach(key => socketList.Remove(key));
}
/// <summary>
+6
View File
@@ -101,3 +101,9 @@
## 📢鸣谢
+ 请施舍一个 ⭐Start ,现在工具处于早期版本,及时订阅更新获得更佳的使用体验
## ⚖️免责声明
+ 本程序仅供学习参考,不得用于商业用途