mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 01:05:34 +08:00
Improved VATSIM datafile parsing
* removed empty split value at end * some formatting * columns to lower case at 1st parsing, not always
This commit is contained in:
@@ -149,9 +149,9 @@ namespace BlackCore
|
||||
CUser user;
|
||||
for (int v = 0; v < bookingNodeValues.size(); v++)
|
||||
{
|
||||
QDomNode bookingNodeValue = bookingNodeValues.at(v);
|
||||
QString name = bookingNodeValue.nodeName().toLower();
|
||||
QString value = bookingNodeValue.toElement().text();
|
||||
const QDomNode bookingNodeValue = bookingNodeValues.at(v);
|
||||
const QString name = bookingNodeValue.nodeName().toLower();
|
||||
const QString value = bookingNodeValue.toElement().text();
|
||||
if (name == "id")
|
||||
{
|
||||
// could be used as unique key
|
||||
@@ -182,7 +182,7 @@ namespace BlackCore
|
||||
}
|
||||
}
|
||||
// time checks
|
||||
QDateTime now = QDateTime::currentDateTimeUtc();
|
||||
const QDateTime now = QDateTime::currentDateTimeUtc();
|
||||
if (now.msecsTo(bookedStation.getBookedUntilUtc()) < (1000 * 60 * 15)) { continue; } // until n mins in past
|
||||
if (now.msecsTo(bookedStation.getBookedFromUtc()) > (1000 * 60 * 60 * 24)) { continue; } // to far in the future, n hours
|
||||
bookedStation.setController(user);
|
||||
|
||||
Reference in New Issue
Block a user