diff options
author | jak1 <mike.wollmann@gmail.com> | 2021-12-18 22:32:34 +0100 |
---|---|---|
committer | jak1 <mike.wollmann@gmail.com> | 2021-12-18 22:32:34 +0100 |
commit | f1b95ce0ff54d6a403ba07ad3dc899b638ffade2 (patch) | |
tree | 0e7e6f318ad7abc6d11b4c53c8ebc71c660c2692 /src/progs | |
parent | becb122a45942224e597fab88f40d5811e9c825c (diff) | |
download | manaverse-f1b95ce0ff54d6a403ba07ad3dc899b638ffade2.tar.gz manaverse-f1b95ce0ff54d6a403ba07ad3dc899b638ffade2.tar.bz2 manaverse-f1b95ce0ff54d6a403ba07ad3dc899b638ffade2.tar.xz manaverse-f1b95ce0ff54d6a403ba07ad3dc899b638ffade2.zip |
added ftp:// to url command also @@ftp:/foo.bar|baz@@ fixes #38
Diffstat (limited to 'src/progs')
-rw-r--r-- | src/progs/manaplus/actions/commands.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/progs/manaplus/actions/commands.cpp b/src/progs/manaplus/actions/commands.cpp index 711816eac..ff0d91e3d 100644 --- a/src/progs/manaplus/actions/commands.cpp +++ b/src/progs/manaplus/actions/commands.cpp @@ -724,7 +724,8 @@ impHandler(url) if (event.tab != nullptr) { std::string url1 = event.args; - if (!strStartWith(url1, "http") && !strStartWith(url1, "?")) + if (!strStartWith(url1, "http") && !strStartWith(url1, "ftp") && + !strStartWith(url1, "?")) url1 = "http://" + url1; std::string str(strprintf("[@@%s |%s@@]", url1.c_str(), event.args.c_str())); @@ -737,7 +738,7 @@ impHandler(url) impHandler(openUrl) { std::string url = event.args; - if (!strStartWith(url, "http")) + if (!strStartWith(url, "http") && !strStartWith(url, "ftp")) url = "http://" + url; openBrowser(url); return true; |