diff options
author | Bill Curtis <bill.curtis@gmail.com> | 2010-11-08 10:54:58 -0800 |
---|---|---|
committer | Bill Curtis <bill.curtis@gmail.com> | 2010-11-08 10:54:58 -0800 |
commit | 3fa059409aad9d7b5aedb4ed112cb52da6990ac4 (patch) | |
tree | 533d4ea13d515f9ab1c045139b159ea89723d815 /indra/newview | |
parent | 65d847de38614a67ed1bdd86445c1c80f4638cc3 (diff) |
changes to read max-agent-groups from login.cgi response
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llagent.cpp | 3 | ||||
-rw-r--r-- | indra/newview/llfloatergroups.cpp | 5 | ||||
-rw-r--r-- | indra/newview/lllogininstance.cpp | 1 | ||||
-rw-r--r-- | indra/newview/llstartup.cpp | 6 | ||||
-rw-r--r-- | indra/newview/llstartup.h | 1 | ||||
-rw-r--r-- | indra/newview/llviewermessage.cpp | 2 |
6 files changed, 13 insertions, 5 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index b202cb5098..9350e50305 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -58,6 +58,7 @@ #include "llsidetray.h" #include "llsky.h" #include "llsmoothstep.h" +#include "llstartup.h" #include "llstatusbar.h" #include "llteleportflags.h" #include "lltool.h" @@ -2427,7 +2428,7 @@ BOOL LLAgent::setUserGroupFlags(const LLUUID& group_id, BOOL accept_notices, BOO BOOL LLAgent::canJoinGroups() const { - return mGroups.count() < MAX_AGENT_GROUPS; + return mGroups.count() < gMaxAgentGroups; } LLQuaternion LLAgent::getHeadRotation() diff --git a/indra/newview/llfloatergroups.cpp b/indra/newview/llfloatergroups.cpp index 3cd2154531..679c932995 100644 --- a/indra/newview/llfloatergroups.cpp +++ b/indra/newview/llfloatergroups.cpp @@ -41,6 +41,7 @@ #include "llbutton.h" #include "llgroupactions.h" #include "llscrolllistctrl.h" +#include "llstartup.h" #include "lltextbox.h" #include "lluictrlfactory.h" #include "lltrans.h" @@ -171,7 +172,7 @@ void LLPanelGroups::reset() group_list->operateOnAll(LLCtrlListInterface::OP_DELETE); } getChild<LLUICtrl>("groupcount")->setTextArg("[COUNT]", llformat("%d",gAgent.mGroups.count())); - getChild<LLUICtrl>("groupcount")->setTextArg("[MAX]", llformat("%d",MAX_AGENT_GROUPS)); + getChild<LLUICtrl>("groupcount")->setTextArg("[MAX]", llformat("%d",gMaxAgentGroups)); init_group_list(getChild<LLScrollListCtrl>("group list"), gAgent.getGroupID()); enableButtons(); @@ -182,7 +183,7 @@ BOOL LLPanelGroups::postBuild() childSetCommitCallback("group list", onGroupList, this); getChild<LLUICtrl>("groupcount")->setTextArg("[COUNT]", llformat("%d",gAgent.mGroups.count())); - getChild<LLUICtrl>("groupcount")->setTextArg("[MAX]", llformat("%d",MAX_AGENT_GROUPS)); + getChild<LLUICtrl>("groupcount")->setTextArg("[MAX]", llformat("%d",gMaxAgentGroups)); LLScrollListCtrl *list = getChild<LLScrollListCtrl>("group list"); if (list) diff --git a/indra/newview/lllogininstance.cpp b/indra/newview/lllogininstance.cpp index 7b2f5984a7..9461bfbc32 100644 --- a/indra/newview/lllogininstance.cpp +++ b/indra/newview/lllogininstance.cpp @@ -146,6 +146,7 @@ void LLLoginInstance::constructAuthParams(LLPointer<LLCredential> user_credentia requested_options.append("newuser-config"); requested_options.append("ui-config"); #endif + requested_options.append("max-agent-groups"); requested_options.append("map-server-url"); requested_options.append("voice-config"); requested_options.append("tutorial_setting"); diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 975d1f9f32..5781398faa 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -198,6 +198,7 @@ // exported globals // bool gAgentMovementCompleted = false; +S32 gMaxAgentGroups; std::string SCREEN_HOME_FILENAME = "screen_home.bmp"; std::string SCREEN_LAST_FILENAME = "screen_last.bmp"; @@ -2944,7 +2945,7 @@ bool process_login_success_response() text = response["circuit_code"].asString(); if(!text.empty()) { - gMessageSystem->mOurCircuitCode = strtoul(text.c_str(), NULL, 10); + gMessageSystem->mOurCircuitCode = strtoult(ext.c_str(), NULL, 10); } std::string sim_ip_str = response["sim_ip"]; std::string sim_port_str = response["sim_port"]; @@ -3148,6 +3149,9 @@ bool process_login_success_response() LLViewerMedia::openIDSetup(openid_url, openid_token); } + std::string max_agent_groups(response["max-agent-groups"]); + gMaxAgentGroups = atoi(max_agent_groups.c_str()); + bool success = false; // JC: gesture loading done below, when we have an asset system // in place. Don't delete/clear gUserCredentials until then. diff --git a/indra/newview/llstartup.h b/indra/newview/llstartup.h index e79aa0dbee..41f6f1b7ee 100644 --- a/indra/newview/llstartup.h +++ b/indra/newview/llstartup.h @@ -70,6 +70,7 @@ typedef enum { // exported symbols extern bool gAgentMovementCompleted; +extern S32 gMaxAgentGroups; extern LLPointer<LLViewerTexture> gStartTexture; class LLStartUp diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index c35173a7d4..14e0d49088 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -633,7 +633,7 @@ bool join_group_response(const LLSD& notification, const LLSD& response) if(option == 0 && !group_id.isNull()) { // check for promotion or demotion. - S32 max_groups = MAX_AGENT_GROUPS; + S32 max_groups = gMaxAgentGroups; if(gAgent.isInGroup(group_id)) ++max_groups; if(gAgent.mGroups.count() < max_groups) |