remove desu

This commit is contained in:
scatterflower 2021-03-13 13:40:37 -06:00
parent fa72e87e34
commit 5368601b67
3 changed files with 1 additions and 14 deletions

View File

@ -240,9 +240,6 @@ class AOClient : public QObject {
void cmdToggleGlobal(int argc, QStringList argv);
void cmdPM(int argc, QStringList argv);
// DELETE THIS LATER MARISA
void cmdTestDateTime(int argc, QStringList argv);
// Command helper functions
QString getAreaTimer(int area_idx, QTimer* timer);
QStringList buildAreaList(int area_idx);
@ -313,8 +310,7 @@ class AOClient : public QObject {
{"motd", {ACLFlags.value("NONE"), 0, &AOClient::cmdMOTD}},
{"announce", {ACLFlags.value("ANNOUNCE"), 1, &AOClient::cmdAnnounce}},
{"m", {ACLFlags.value("MODCHAT"), 1, &AOClient::cmdM}},
{"gm", {ACLFlags.value("MODCHAT"), 1, &AOClient::cmdGM}},
{"test", {ACLFlags.value("NONE"), 1, &AOClient::cmdTestDateTime}}
{"gm", {ACLFlags.value("MODCHAT"), 1, &AOClient::cmdGM}}
};
QString partial_packet;

View File

@ -1049,11 +1049,6 @@ QString AOClient::getAreaTimer(int area_idx, QTimer* timer)
}
}
void AOClient::cmdTestDateTime(int argc, QStringList argv)
{
qDebug() << parseTime(argv[0]);
}
long long AOClient::parseTime(QString input)
{
QRegularExpression regex("(?:(?:(?<year>.*?)y)*(?:(?<week>.*?)w)*(?:(?<day>.*?)d)*(?:(?<hr>.*?)h)*(?:(?<min>.*?)m)*(?:(?<sec>.*?)s)*)");
@ -1068,14 +1063,11 @@ long long AOClient::parseTime(QString input)
str_minute = match.captured("min");
str_second = match.captured("sec");
qDebug() << str_year << "years," << str_week << "weeks," << str_day << "days," << str_hour << "hours," << str_minute << "minutes," << str_second << "seconds";
bool is_well_formed = false;
QString concat_str(str_year + str_week + str_day + str_hour + str_minute + str_second);
concat_str.toInt(&is_well_formed);
if (!is_well_formed) {
qDebug() << "retard alert!";
return -1;
}

View File

@ -37,7 +37,6 @@ bool DBManager::isIPBanned(QHostAddress ip)
if (query.first()) {
long long duration = getBanDuration(ip);
long long ban_time = query.value(0).toLongLong();
qDebug() << ban_time << "duration:" << duration;
if (duration == -2)
return true;
long long current_time = QDateTime::currentDateTime().toSecsSinceEpoch();