This repository has been archived by the owner on Aug 26, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Modified pocket expansion to only occur for status messages, since people are too often sending free-form messages to intel with the word "pocket" in them. This will stop the entire pocket from going red and us all getting an earful of red alert. - Changed the parser to not ignore two letter words as potentially being part of a pilots name. At least one red created an alt with a two char first and two char last name to fly under the radar. - Preliminary work to support HTTP links.
- Loading branch information
Showing
9 changed files
with
157 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
/* | ||
* Imp: Copyright 2016, 2017 Jesse Litton ([email protected]) | ||
* | ||
* This file is part of Imp. | ||
* | ||
* Imp is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* Imp is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with Imp. If not, see <http://www.gnu.org/licenses/>. | ||
* | ||
*/ | ||
|
||
#include <QApplication> | ||
#include <QFile> | ||
#include <QMessageBox> | ||
#include <QTextStream> | ||
|
||
#include "utility.h" | ||
#include "abstract_os.h" | ||
|
||
QStringList fromFile(const QString& fileName) | ||
{ | ||
QStringList stringList; | ||
|
||
QFile file(appFilesPath() + "/dictionaries/" + fileName); | ||
|
||
if(!file.open(QIODevice::ReadOnly)) | ||
{ | ||
QMessageBox::critical(NULL, "Error Opening File", "Could not open file " + | ||
appFilesPath() + "/dictionaries/" + fileName + | ||
"."); | ||
QApplication::exit(1); | ||
} | ||
else | ||
{ | ||
QTextStream in(&file); | ||
QString all = in.readAll(); | ||
stringList = all.split('\n'); | ||
stringList.removeAll(""); | ||
|
||
for(int i=stringList.length()-1; i>=0; i--) | ||
{ | ||
if(stringList[i].trimmed()[0]=='#') | ||
{ | ||
// Discard comments | ||
stringList.removeAt(i); | ||
} | ||
} | ||
} | ||
|
||
return stringList; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
* Imp: Copyright 2016, 2017 Jesse Litton ([email protected]) | ||
* | ||
* This file is part of Imp. | ||
* | ||
* Imp is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* Imp is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with Imp. If not, see <http://www.gnu.org/licenses/>. | ||
* | ||
*/ | ||
|
||
#ifndef UTILITY_H | ||
#define UTILITY_H | ||
|
||
#include <QString> | ||
|
||
QStringList fromFile(const QString& fileName); | ||
|
||
#endif // UTILITY_H |