diff options
| author | TanninOne <seppleviathan@gmx.de> | 2015-12-04 22:30:35 +0100 |
|---|---|---|
| committer | TanninOne <seppleviathan@gmx.de> | 2015-12-04 22:30:35 +0100 |
| commit | 688e149c96c29d8249c9db416f5773cfc7baad6d (patch) | |
| tree | 3a59b3fce8da8afec776e275aca979681711d4de /src/shared/gameinfo.cpp | |
| parent | 87d5fe28f6000e7a711fe56aa5e9bedfd89128fb (diff) | |
| parent | d4754f4d3ca7451d784e89ae1ddef240666dfdf8 (diff) | |
Merge pull request #334 from ThosRTanner/issue/308
Allow right click on module to see web link if supplied in fomod
Diffstat (limited to 'src/shared/gameinfo.cpp')
| -rw-r--r-- | src/shared/gameinfo.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/shared/gameinfo.cpp b/src/shared/gameinfo.cpp index 1f25cec1..5338c069 100644 --- a/src/shared/gameinfo.cpp +++ b/src/shared/gameinfo.cpp @@ -86,6 +86,19 @@ void GameInfo::identifyMyGamesDirectory(const std::wstring &file) }
}
+bool GameInfo::isValidModURL(int modID, const std::wstring &url, const std::wstring &alt) const
+{
+ std::wostringstream os;
+ os << getNexusPage(false) << "/mods/" << modID;
+ if (url == os.str()) {
+ return true;
+ }
+ os.clear();
+ os.str(L"");
+ os << alt << "/mods/" << modID;
+ return url == os.str();
+}
+
bool GameInfo::identifyGame(const std::wstring &moDirectory, const std::wstring &moDataDirectory, const std::wstring &searchPath)
{
|
