diff options
Diffstat (limited to 'indra/newview/llviewermessage.cpp')
-rw-r--r-- | indra/newview/llviewermessage.cpp | 55 |
1 files changed, 23 insertions, 32 deletions
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index d8e6c52c8c..ea1097c477 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -2914,46 +2914,37 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**) if (!gLastVersionChannel.empty()) { - LLSD payload; - payload["message"] = version_channel; - LLNotifications::instance().add("ServerVersionChanged", LLSD(), payload, server_version_changed_callback); - } - - gLastVersionChannel = version_channel; -} - -bool server_version_changed_callback(const LLSD& notification, const LLSD& response) -{ - if(notification["payload"]["message"].asString() =="") - return false; - std::string url ="http://wiki.secondlife.com/wiki/Release_Notes/"; - //parse the msg string - std::string server_version = notification["payload"]["message"].asString(); - std::vector<std::string> s_vect; - boost::algorithm::split(s_vect, server_version, isspace); - for(U32 i = 0; i < s_vect.size(); i++) - { - if (i != (s_vect.size() - 1)) - { - if(i != (s_vect.size() - 2)) + // work out the URL for this server's Release Notes + std::string url ="http://wiki.secondlife.com/wiki/Release_Notes/"; + std::string server_version = version_channel; + std::vector<std::string> s_vect; + boost::algorithm::split(s_vect, server_version, isspace); + for(U32 i = 0; i < s_vect.size(); i++) + { + if (i != (s_vect.size() - 1)) { - url += s_vect[i] + "_"; + if(i != (s_vect.size() - 2)) + { + url += s_vect[i] + "_"; + } + else + { + url += s_vect[i] + "/"; + } } else { - url += s_vect[i] + "/"; + url += s_vect[i].substr(0,4); } } - else - { - url += s_vect[i].substr(0,4); - } + + LLSD args; + args["URL"] = url; + LLNotifications::instance().add("ServerVersionChanged", args); } - - LLWeb::loadURL(url); - return false; -} + gLastVersionChannel = version_channel; +} void process_crossed_region(LLMessageSystem* msg, void**) { |