remove desu
This commit is contained in:
parent
fa72e87e34
commit
5368601b67
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user