aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llurldispatcher.cpp
diff options
context:
space:
mode:
authorMcCabe Maxsted2010-08-10 15:06:04 -0700
committerMcCabe Maxsted2010-08-10 15:06:04 -0700
commit463ccc12fa763f70c5392b89a2ec6cd9d68c40a9 (patch)
treee722266dea733690b7fa759754059161fb77cf2b /linden/indra/newview/llurldispatcher.cpp
parentAdded meta7windlight.h file to CMake (diff)
downloadmeta-impy-463ccc12fa763f70c5392b89a2ec6cd9d68c40a9.zip
meta-impy-463ccc12fa763f70c5392b89a2ec6cd9d68c40a9.tar.gz
meta-impy-463ccc12fa763f70c5392b89a2ec6cd9d68c40a9.tar.bz2
meta-impy-463ccc12fa763f70c5392b89a2ec6cd9d68c40a9.tar.xz
Applied patch for SNOW-636: parse links to maps.secondlife.com in chat as slurls (viewer2 slurl format)
Diffstat (limited to 'linden/indra/newview/llurldispatcher.cpp')
-rw-r--r--linden/indra/newview/llurldispatcher.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/linden/indra/newview/llurldispatcher.cpp b/linden/indra/newview/llurldispatcher.cpp
index 7c50bd4..f9b6b39 100644
--- a/linden/indra/newview/llurldispatcher.cpp
+++ b/linden/indra/newview/llurldispatcher.cpp
@@ -53,6 +53,7 @@ const std::string SLURL_SL_HELP_PREFIX = "secondlife://app.";
53const std::string SLURL_SL_PREFIX = "sl://"; 53const std::string SLURL_SL_PREFIX = "sl://";
54const std::string SLURL_SECONDLIFE_PREFIX = "secondlife://"; 54const std::string SLURL_SECONDLIFE_PREFIX = "secondlife://";
55const std::string SLURL_SLURL_PREFIX = "http://slurl.com/secondlife/"; 55const std::string SLURL_SLURL_PREFIX = "http://slurl.com/secondlife/";
56const std::string SLURL_SLURL_ALT_PREFIX = "http://maps.secondlife.com/secondlife/";
56 57
57const std::string SLURL_APP_TOKEN = "app/"; 58const std::string SLURL_APP_TOKEN = "app/";
58 59
@@ -117,6 +118,7 @@ bool LLURLDispatcherImpl::isSLURL(const std::string& url)
117 if (matchPrefix(url, SLURL_SL_PREFIX)) return true; 118 if (matchPrefix(url, SLURL_SL_PREFIX)) return true;
118 if (matchPrefix(url, SLURL_SECONDLIFE_PREFIX)) return true; 119 if (matchPrefix(url, SLURL_SECONDLIFE_PREFIX)) return true;
119 if (matchPrefix(url, SLURL_SLURL_PREFIX)) return true; 120 if (matchPrefix(url, SLURL_SLURL_PREFIX)) return true;
121 if (matchPrefix(url, SLURL_SLURL_ALT_PREFIX)) return true;
120 return false; 122 return false;
121} 123}
122 124
@@ -125,7 +127,8 @@ bool LLURLDispatcherImpl::isSLURLCommand(const std::string& url)
125{ 127{
126 if (matchPrefix(url, SLURL_SL_PREFIX + SLURL_APP_TOKEN) 128 if (matchPrefix(url, SLURL_SL_PREFIX + SLURL_APP_TOKEN)
127 || matchPrefix(url, SLURL_SECONDLIFE_PREFIX + "/" + SLURL_APP_TOKEN) 129 || matchPrefix(url, SLURL_SECONDLIFE_PREFIX + "/" + SLURL_APP_TOKEN)
128 || matchPrefix(url, SLURL_SLURL_PREFIX + SLURL_APP_TOKEN) ) 130 || matchPrefix(url, SLURL_SLURL_PREFIX + SLURL_APP_TOKEN)
131 || matchPrefix(url, SLURL_SLURL_ALT_PREFIX + SLURL_APP_TOKEN))
129 { 132 {
130 return true; 133 return true;
131 } 134 }
@@ -364,6 +367,10 @@ std::string LLURLDispatcherImpl::stripProtocol(const std::string& url)
364 { 367 {
365 stripped.erase(0, SLURL_SLURL_PREFIX.length()); 368 stripped.erase(0, SLURL_SLURL_PREFIX.length());
366 } 369 }
370 else if (matchPrefix(stripped, SLURL_SLURL_ALT_PREFIX))
371 {
372 stripped.erase(0, SLURL_SLURL_ALT_PREFIX.length());
373 }
367 return stripped; 374 return stripped;
368} 375}
369 376