Skip to content

Commit

Permalink
fix GroupClearLimit
Browse files Browse the repository at this point in the history
修复单次清群上限实际并无作用的bug
  • Loading branch information
mystringEmpty committed Jul 22, 2021
1 parent de3f9aa commit 76f8780
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Dice/DiceJob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ void clear_group(DiceJob& job) {
if (tLast < grpline)GrpDelete.push_back(id);
grp.leave(getMsg("strLeaveNoPower"));
intCnt++;
if (console["GroupClearLimit"] > 0 && intCnt >= console["GroupClearLimit"])break;
this_thread::sleep_for(3s);
}
}
Expand All @@ -214,7 +215,8 @@ void clear_group(DiceJob& job) {
res << printGroup(id) + ":" + to_string(intDay) + "\n";
grp.leave(getMsg("strLeaveUnused", job.strVar));
intCnt++;
this_thread::sleep_for(2s);
if (console["GroupClearLimit"] > 0 && intCnt >= console["GroupClearLimit"])break;
this_thread::sleep_for(3s);
}
}
job.note(GlobalMsg["strSelfName"] + "已筛除潜水" + strDayLim + "天群聊" + to_string(intCnt) + "个√" + res.show(), 0b10);
Expand Down Expand Up @@ -245,6 +247,10 @@ void clear_group(DiceJob& job) {
intCnt++;
break;
}
else if (console["GroupClearLimit"] > 0 && intCnt >= console["GroupClearLimit"]) {
if(intCnt == console["GroupClearLimit"])res << "*单次清退已达上限*";
res << printChat(grp) + "" + printQQ(eachQQ);
}
else if (console["LeaveBlackQQ"]) {
if (grp.tUpdated < grpline)GrpDelete.push_back(id);
res << printChat(grp) + "" + printQQ(eachQQ);
Expand Down Expand Up @@ -278,6 +284,7 @@ void clear_group(DiceJob& job) {
res << printChat(grp);
grp.leave(getMsg("strPreserve"));
intCnt++;
if (console["GroupClearLimit"] > 0 && intCnt >= console["GroupClearLimit"])break;
this_thread::sleep_for(3s);
}
job.note(GlobalMsg["strSelfName"] + "筛除无许可群聊" + to_string(intCnt) + "个:" + res.show(), 1);
Expand Down

0 comments on commit 76f8780

Please sign in to comment.