Fix indention in llimprocessing.cpp

Wed, 04 Apr 2018 21:19:17 +0200

author
Ansariel
date
Wed, 04 Apr 2018 21:19:17 +0200
changeset 55029
36d269b6a858
parent 55028
b2efb57148e2
child 55030
5193a188ca68

Fix indention in llimprocessing.cpp

indra/newview/llimprocessing.cpp file | annotate | diff | revisions
     1.1 --- a/indra/newview/llimprocessing.cpp	Wed Apr 04 20:57:01 2018 +0200
     1.2 +++ b/indra/newview/llimprocessing.cpp	Wed Apr 04 21:19:17 2018 +0200
     1.3 @@ -232,12 +232,12 @@
     1.4      // Strip any SLURL from the message display. (DEV-2754)
     1.5      std::string msg = info->mDesc;
     1.6      int indx = msg.find(" ( http://slurl.com/secondlife/");
     1.7 -    if(indx == std::string::npos)
     1.8 +    if (indx == std::string::npos)
     1.9      {
    1.10          // try to find new slurl host
    1.11          indx = msg.find(" ( http://maps.secondlife.com/secondlife/");
    1.12      }
    1.13 -    if(indx >= 0)
    1.14 +    if (indx >= 0)
    1.15      {
    1.16          LLStringUtil::truncate(msg, indx);
    1.17      }
    1.18 @@ -684,7 +684,7 @@
    1.19      chat.mFromID = from_id;
    1.20      chat.mFromName = name;
    1.21      chat.mSourceType = (from_id.isNull() || (name == std::string(SYSTEM_FROM))) ? CHAT_SOURCE_SYSTEM : CHAT_SOURCE_AGENT;
    1.22 -    
    1.23 +
    1.24      if (chat.mSourceType == CHAT_SOURCE_SYSTEM)
    1.25      { // Translate server message if required (MAINT-6109)
    1.26          translate_if_needed(message);
    1.27 @@ -722,262 +722,122 @@
    1.28      LLSD payload;
    1.29      LLNotification::Params params;
    1.30  
    1.31 -    switch(dialog)
    1.32 -    { 
    1.33 -    case IM_CONSOLE_AND_CHAT_HISTORY:
    1.34 -        args["MESSAGE"] = message;
    1.35 -        payload["from_id"] = from_id;
    1.36 +    switch (dialog)
    1.37 +    {
    1.38 +        case IM_CONSOLE_AND_CHAT_HISTORY:
    1.39 +            args["MESSAGE"] = message;
    1.40 +            payload["from_id"] = from_id;
    1.41  
    1.42 -        params.name = "IMSystemMessageTip";
    1.43 -        params.substitutions = args;
    1.44 -        params.payload = payload;
    1.45 -        LLPostponedNotification::add<LLPostponedIMSystemTipNotification>(params, from_id, false);
    1.46 -        break;
    1.47 +            params.name = "IMSystemMessageTip";
    1.48 +            params.substitutions = args;
    1.49 +            params.payload = payload;
    1.50 +            LLPostponedNotification::add<LLPostponedIMSystemTipNotification>(params, from_id, false);
    1.51 +            break;
    1.52  
    1.53 -    case IM_NOTHING_SPECIAL:	// p2p IM
    1.54 -        // Don't show dialog, just do IM
    1.55 -        if (!gAgent.isGodlike()
    1.56 -                && gAgent.getRegion()->isPrelude() 
    1.57 -                && to_id.isNull() )
    1.58 -        {
    1.59 -            // do nothing -- don't distract newbies in
    1.60 -            // Prelude with global IMs
    1.61 -        }
    1.62 +        case IM_NOTHING_SPECIAL:	// p2p IM
    1.63 +            // Don't show dialog, just do IM
    1.64 +            if (!gAgent.isGodlike()
    1.65 +                && gAgent.getRegion()->isPrelude()
    1.66 +                && to_id.isNull())
    1.67 +            {
    1.68 +                // do nothing -- don't distract newbies in
    1.69 +                // Prelude with global IMs
    1.70 +            }
    1.71  // [RLVa:KB] - Checked: RLVa-2.1.0
    1.72 -        else if ( (RlvActions::isRlvEnabled()) && (offline == IM_ONLINE) && (!is_muted) && ((!accept_im_from_only_friend) || (is_friend)) &&
    1.73 -                  (message.length() > 3) && (RLV_CMD_PREFIX == message[0]) && (RlvHandler::instance().processIMQuery(from_id, message)) )
    1.74 -        {
    1.75 -            // Eat the message and do nothing
    1.76 -            return;
    1.77 -        }
    1.78 +            else if ( (RlvActions::isRlvEnabled()) && (offline == IM_ONLINE) && (!is_muted) && ((!accept_im_from_only_friend) || (is_friend)) &&
    1.79 +                      (message.length() > 3) && (RLV_CMD_PREFIX == message[0]) && (RlvHandler::instance().processIMQuery(from_id, message)) )
    1.80 +            {
    1.81 +                // Eat the message and do nothing
    1.82 +                return;
    1.83 +            }
    1.84  // [/RLVa:KB]
    1.85 -//      else if (offline == IM_ONLINE 
    1.86 -//                  && is_do_not_disturb
    1.87 -//                  && from_id.notNull() //not a system message
    1.88 -//                  && to_id.notNull()) //not global message
    1.89 +//          else if (offline == IM_ONLINE 
    1.90 +//                      && is_do_not_disturb
    1.91 +//                      && from_id.notNull() //not a system message
    1.92 +//                      && to_id.notNull()) //not global message
    1.93  // [RLVa:KB] - Checked: 2010-11-30 (RLVa-1.3.0)
    1.94 -        // <FS:Ansariel> Only send the busy reponse if either the sender is not
    1.95 -        //               muted OR the sender is muted and we explicitely want
    1.96 -        //               to inform him about that fact.
    1.97 -        else if (offline == IM_ONLINE
    1.98 -                    && (!accept_im_from_only_friend || is_friend)                                    // is friend or accept IMs from friend only disabled
    1.99 -                    && ((is_do_not_disturb && (!is_muted || (is_muted && !is_autorespond_muted))) || // do not disturb
   1.100 -                        (is_autorespond && !is_muted) ||                                             // autorespond everyone
   1.101 -                        (is_autorespond_nonfriends && !is_friend && !is_muted) ||                    // autorespond friends only
   1.102 -                        (is_afk && FSSendAwayAvatarResponse && !is_muted))                           // away
   1.103 -                    && from_id.notNull() //not a system message
   1.104 -                    && to_id.notNull() //not global message
   1.105 -                    && RlvActions::canReceiveIM(from_id))
   1.106 -// [/RLVa:KB]
   1.107 -        {
   1.108 -            // <FS:Ansariel> Log autoresponse notification after initial message
   1.109 -            bool has_session = true;
   1.110 +            // <FS:Ansariel> Only send the busy reponse if either the sender is not
   1.111 +            //               muted OR the sender is muted and we explicitely want
   1.112 +            //               to inform him about that fact.
   1.113 +            else if (offline == IM_ONLINE
   1.114 +                        && (!accept_im_from_only_friend || is_friend)                                    // is friend or accept IMs from friend only disabled
   1.115 +                        && ((is_do_not_disturb && (!is_muted || (is_muted && !is_autorespond_muted))) || // do not disturb
   1.116 +                            (is_autorespond && !is_muted) ||                                             // autorespond everyone
   1.117 +                            (is_autorespond_nonfriends && !is_friend && !is_muted) ||                    // autorespond friends only
   1.118 +                            (is_afk && FSSendAwayAvatarResponse && !is_muted))                           // away
   1.119 +                        && from_id.notNull() //not a system message
   1.120 +                        && to_id.notNull() //not global message
   1.121 +                        && RlvActions::canReceiveIM(from_id))
   1.122 +    // [/RLVa:KB]
   1.123 +            {
   1.124 +                // <FS:Ansariel> Log autoresponse notification after initial message
   1.125 +                bool has_session = true;
   1.126  
   1.127 -            // <FS:Ansariel> Old "do not disturb" message behavior: only send once if session not open
   1.128 -            // Session id will be null if avatar answers from offline IM via email
   1.129 -            std::string response;
   1.130 -            if (!gIMMgr->hasSession(session_id) && session_id.notNull())
   1.131 -            {
   1.132 -            // </FS:Ansariel>
   1.133 -                // <FS:Ansariel> Log autoresponse notification after initial message
   1.134 -                has_session = false;
   1.135 -                // <FS:Ansariel> FS autoresponse feature
   1.136 -                std::string my_name;
   1.137 -                LLAgentUI::buildFullname(my_name);
   1.138 -                if (is_do_not_disturb)
   1.139 +                // <FS:Ansariel> Old "do not disturb" message behavior: only send once if session not open
   1.140 +                // Session id will be null if avatar answers from offline IM via email
   1.141 +                std::string response;
   1.142 +                if (!gIMMgr->hasSession(session_id) && session_id.notNull())
   1.143                  {
   1.144 -                    response = gSavedPerAccountSettings.getString("DoNotDisturbModeResponse");
   1.145 -                }
   1.146 -                else if (is_autorespond_nonfriends && !is_friend)
   1.147 -                {
   1.148 -                    response = gSavedPerAccountSettings.getString("FSAutorespondNonFriendsResponse");
   1.149 -                }
   1.150 -                else if (is_autorespond)
   1.151 -                {
   1.152 -                    response = gSavedPerAccountSettings.getString("FSAutorespondModeResponse");
   1.153 -                }
   1.154 -                // <FS:PP> FIRE-10500: Autoresponse for (Away)
   1.155 -                else if (is_afk && FSSendAwayAvatarResponse)
   1.156 -                {
   1.157 -                    response = gSavedPerAccountSettings.getString("FSAwayAvatarResponse");
   1.158 -                }
   1.159 -                // </FS:PP>
   1.160 -                else
   1.161 -                {
   1.162 -                    LL_WARNS() << "Unknown auto-response mode" << LL_ENDL;
   1.163 -                }
   1.164 -                pack_instant_message(
   1.165 -                    gMessageSystem,
   1.166 -                    gAgent.getID(),
   1.167 -                    FALSE,
   1.168 -                    gAgent.getSessionID(),
   1.169 -                    from_id,
   1.170 -                    my_name,
   1.171 -                    response,
   1.172 -                    IM_ONLINE,
   1.173 -                    IM_DO_NOT_DISTURB_AUTO_RESPONSE,
   1.174 -                    session_id);
   1.175 -                gAgent.sendReliableMessage();
   1.176 -                // </FS:Ansariel> FS autoresponse feature
   1.177 -            // <FS:Ansariel> Old "do not disturb" message behavior: only send once if session not open
   1.178 -            }
   1.179 -            // </FS:Ansariel>
   1.180 -
   1.181 -            // <FS:Ansariel> checkfor and process reqinfo
   1.182 -            if (has_session)
   1.183 -            {
   1.184 -                message = FSData::getInstance()->processRequestForInfo(from_id,message,name,session_id);
   1.185 -            }
   1.186 -            // </FS:Ansariel>
   1.187 -
   1.188 -            // now store incoming IM in chat history
   1.189 -
   1.190 -            buffer = message;
   1.191 -    
   1.192 -            LL_DEBUGS("Messaging") << "session_id( " << session_id << " ), from_id( " << from_id << " )" << LL_ENDL;
   1.193 -
   1.194 -            // <FS:PP> FIRE-10178: Keyword Alerts in group IM do not work unless the group is in the foreground (notification on receipt of IM)
   1.195 -            chat.mText = buffer;
   1.196 -            bool keyword_alert_performed = false;
   1.197 -            if (FSKeywords::getInstance()->chatContainsKeyword(chat, false))
   1.198 -            {
   1.199 -                FSKeywords::notify(chat);
   1.200 -                keyword_alert_performed = true;
   1.201 -            }
   1.202 -            // </FS:PP>
   1.203 -
   1.204 -            // add to IM panel, but do not bother the user
   1.205 -            gIMMgr->addMessage(
   1.206 -                session_id,
   1.207 -                from_id,
   1.208 -                name,
   1.209 -                buffer,
   1.210 -                IM_OFFLINE == offline,
   1.211 -                LLStringUtil::null,
   1.212 -                dialog,
   1.213 -                parent_estate_id,
   1.214 -                region_id,
   1.215 -                position,
   1.216 -                true,
   1.217 -                false,
   1.218 -                keyword_alert_performed);
   1.219 -
   1.220 -            // <FS:Ansariel> Old "do not disturb" message behavior: only send once if session not open
   1.221 -            //if (!gIMMgr->isDNDMessageSend(session_id))
   1.222 -            //{
   1.223 -            //	// return a standard "do not disturb" message, but only do it to online IM
   1.224 -            //	// (i.e. not other auto responses and not store-and-forward IM)
   1.225 -            //	send_do_not_disturb_message(msg, from_id, session_id);
   1.226 -            //	gIMMgr->setDNDMessageSent(session_id, true);
   1.227 -            //}
   1.228 -            // </FS:Ansariel>
   1.229 -
   1.230 -            if (!has_session)
   1.231 -            {
   1.232 -                // <FS:LO> Fire-5389 - "Autoresponse Sent" message added to Firestorm as was in Phoenix
   1.233 -                LLStringUtil::format_map_t args;
   1.234 -                args["MESSAGE"] = response;
   1.235 -
   1.236 -                gIMMgr->addMessage(
   1.237 -                    session_id,
   1.238 -                    gAgentID,
   1.239 -                    LLStringUtil::null, // Pass null value so no name gets prepended
   1.240 -                    LLTrans::getString("IM_autoresponse_sent", args),
   1.241 -                    false,
   1.242 -                    name,
   1.243 -                    IM_NOTHING_SPECIAL,
   1.244 -                    parent_estate_id,
   1.245 -                    region_id,
   1.246 -                    position,
   1.247 -                    false,
   1.248 -                    true
   1.249 -                    );
   1.250 -                // </FS:LO>
   1.251 -
   1.252 -                // <FS:Ansariel> Send inventory item on autoresponse
   1.253 -                LLUUID item_id(gSavedPerAccountSettings.getString("FSAutoresponseItemUUID"));
   1.254 -                if (item_id.notNull())
   1.255 -                {
   1.256 -                    LLInventoryItem* item = dynamic_cast<LLInventoryItem*>(gInventory.getItem(item_id));
   1.257 -                    if (item)
   1.258 +                // </FS:Ansariel>
   1.259 +                    // <FS:Ansariel> Log autoresponse notification after initial message
   1.260 +                    has_session = false;
   1.261 +                    // <FS:Ansariel> FS autoresponse feature
   1.262 +                    std::string my_name;
   1.263 +                    LLAgentUI::buildFullname(my_name);
   1.264 +                    if (is_do_not_disturb)
   1.265                      {
   1.266 -                        gIMMgr->addMessage(
   1.267 -                                session_id,
   1.268 -                                gAgentID,
   1.269 -                                LLStringUtil::null, // Pass null value so no name gets prepended
   1.270 -                                LLTrans::getString("IM_autoresponse_item_sent", LLSD().with("[ITEM_NAME]", item->getName())),
   1.271 -                                false,
   1.272 -                                name,
   1.273 -                                IM_NOTHING_SPECIAL,
   1.274 -                                parent_estate_id,
   1.275 -                                region_id,
   1.276 -                                position,
   1.277 -                                false,
   1.278 -                                true);
   1.279 -                        LLGiveInventory::doGiveInventoryItem(from_id, item, session_id);
   1.280 +                        response = gSavedPerAccountSettings.getString("DoNotDisturbModeResponse");
   1.281                      }
   1.282 +                    else if (is_autorespond_nonfriends && !is_friend)
   1.283 +                    {
   1.284 +                        response = gSavedPerAccountSettings.getString("FSAutorespondNonFriendsResponse");
   1.285 +                    }
   1.286 +                    else if (is_autorespond)
   1.287 +                    {
   1.288 +                        response = gSavedPerAccountSettings.getString("FSAutorespondModeResponse");
   1.289 +                    }
   1.290 +                    // <FS:PP> FIRE-10500: Autoresponse for (Away)
   1.291 +                    else if (is_afk && FSSendAwayAvatarResponse)
   1.292 +                    {
   1.293 +                        response = gSavedPerAccountSettings.getString("FSAwayAvatarResponse");
   1.294 +                    }
   1.295 +                    // </FS:PP>
   1.296 +                    else
   1.297 +                    {
   1.298 +                        LL_WARNS() << "Unknown auto-response mode" << LL_ENDL;
   1.299 +                    }
   1.300 +                    pack_instant_message(
   1.301 +                        gMessageSystem,
   1.302 +                        gAgent.getID(),
   1.303 +                        FALSE,
   1.304 +                        gAgent.getSessionID(),
   1.305 +                        from_id,
   1.306 +                        my_name,
   1.307 +                        response,
   1.308 +                        IM_ONLINE,
   1.309 +                        IM_DO_NOT_DISTURB_AUTO_RESPONSE,
   1.310 +                        session_id);
   1.311 +                    gAgent.sendReliableMessage();
   1.312 +                    // </FS:Ansariel> FS autoresponse feature
   1.313 +                // <FS:Ansariel> Old "do not disturb" message behavior: only send once if session not open
   1.314                  }
   1.315                  // </FS:Ansariel>
   1.316 -            }
   1.317 -        }
   1.318 -        else if (from_id.isNull())
   1.319 -        {
   1.320 -            LLSD args;
   1.321 -            args["MESSAGE"] = message;
   1.322 -            LLNotificationsUtil::add("SystemMessage", args);
   1.323 -        }
   1.324 -        else if (to_id.isNull())
   1.325 -        {
   1.326 -            // Message to everyone from GOD, look up the fullname since
   1.327 -            // server always slams name to legacy names
   1.328 -            LLAvatarNameCache::get(from_id, boost::bind(god_message_name_cb, _2, chat, message));
   1.329 -        }
   1.330 -        else
   1.331 -        {
   1.332 -            // standard message, not from system
   1.333 -            std::string saved;
   1.334 -            if(offline == IM_OFFLINE)
   1.335 -            {
   1.336 -                LLStringUtil::format_map_t args;
   1.337 -                args["[LONG_TIMESTAMP]"] = formatted_time(timestamp);
   1.338 -                saved = LLTrans::getString("Saved_message", args);
   1.339 -            }
   1.340 -            buffer = saved + message;
   1.341  
   1.342 -            LL_DEBUGS("Messaging") << "session_id( " << session_id << " ), from_id( " << from_id << " )" << LL_ENDL;
   1.343 +                // <FS:Ansariel> checkfor and process reqinfo
   1.344 +                if (has_session)
   1.345 +                {
   1.346 +                    message = FSData::getInstance()->processRequestForInfo(from_id,message,name,session_id);
   1.347 +                }
   1.348 +                // </FS:Ansariel>
   1.349  
   1.350 -            bool mute_im = is_muted;
   1.351 -            if (accept_im_from_only_friend && !is_friend)
   1.352 -            {
   1.353 -                if (!gIMMgr->isNonFriendSessionNotified(session_id))
   1.354 -                {
   1.355 -                    // <FS:Ansariel> Disable this - doesn't make sense it will be skipped by LLIMMgr::addMessage() anyway
   1.356 -                    //std::string message = LLTrans::getString("IM_unblock_only_groups_friends");
   1.357 -                    //gIMMgr->addMessage(session_id, from_id, name, message, IM_OFFLINE == offline);
   1.358 -                    // </FS:Ansariel>
   1.359 -                    gIMMgr->addNotifiedNonFriendSessionID(session_id);
   1.360 -                }
   1.361 +                // now store incoming IM in chat history
   1.362  
   1.363 -                mute_im = true;
   1.364 -            }
   1.365 +                buffer = message;
   1.366  
   1.367 -// [RLVa:KB] - Checked: 2010-11-30 (RLVa-1.3.0)
   1.368 -            // Don't block offline IMs, or IMs from Lindens
   1.369 -            if ( (rlv_handler_t::isEnabled()) && (offline != IM_OFFLINE) && (!RlvActions::canReceiveIM(from_id)) && (!LLMuteList::getInstance()->isLinden(original_name) ))
   1.370 -            {
   1.371 -                if (!mute_im)
   1.372 -                    RlvUtil::sendBusyMessage(from_id, RlvStrings::getString(RLV_STRING_BLOCKED_RECVIM_REMOTE), session_id);
   1.373 -                message = RlvStrings::getString(RLV_STRING_BLOCKED_RECVIM);
   1.374 -            }
   1.375 -// [/RLVa:KB]
   1.376 -
   1.377 -            if (!mute_im) 
   1.378 -            {
   1.379 -                // checkfor and process reqinfo
   1.380 -                message = FSData::getInstance()->processRequestForInfo(from_id, message, name, session_id);
   1.381 +                LL_DEBUGS("Messaging") << "session_id( " << session_id << " ), from_id( " << from_id << " )" << LL_ENDL;
   1.382  
   1.383                  // <FS:PP> FIRE-10178: Keyword Alerts in group IM do not work unless the group is in the foreground (notification on receipt of IM)
   1.384 -                chat.mText = message;
   1.385 +                chat.mText = buffer;
   1.386                  bool keyword_alert_performed = false;
   1.387                  if (FSKeywords::getInstance()->chatContainsKeyword(chat, false))
   1.388                  {
   1.389 @@ -986,8 +846,7 @@
   1.390                  }
   1.391                  // </FS:PP>
   1.392  
   1.393 -                buffer = saved + message;
   1.394 -
   1.395 +                // add to IM panel, but do not bother the user
   1.396                  gIMMgr->addMessage(
   1.397                      session_id,
   1.398                      from_id,
   1.399 @@ -1002,71 +861,202 @@
   1.400                      true,
   1.401                      false,
   1.402                      keyword_alert_performed);
   1.403 +
   1.404 +                // <FS:Ansariel> Old "do not disturb" message behavior: only send once if session not open
   1.405 +                //if (!gIMMgr->isDNDMessageSend(session_id))
   1.406 +                //{
   1.407 +                //	// return a standard "do not disturb" message, but only do it to online IM
   1.408 +                //	// (i.e. not other auto responses and not store-and-forward IM)
   1.409 +                //	send_do_not_disturb_message(msg, from_id, session_id);
   1.410 +                //	gIMMgr->setDNDMessageSent(session_id, true);
   1.411 +                //}
   1.412 +                // </FS:Ansariel>
   1.413 +
   1.414 +                if (!has_session)
   1.415 +                {
   1.416 +                    // <FS:LO> Fire-5389 - "Autoresponse Sent" message added to Firestorm as was in Phoenix
   1.417 +                    LLStringUtil::format_map_t args;
   1.418 +                    args["MESSAGE"] = response;
   1.419 +
   1.420 +                    gIMMgr->addMessage(
   1.421 +                        session_id,
   1.422 +                        gAgentID,
   1.423 +                        LLStringUtil::null, // Pass null value so no name gets prepended
   1.424 +                        LLTrans::getString("IM_autoresponse_sent", args),
   1.425 +                        false,
   1.426 +                        name,
   1.427 +                        IM_NOTHING_SPECIAL,
   1.428 +                        parent_estate_id,
   1.429 +                        region_id,
   1.430 +                        position,
   1.431 +                        false,
   1.432 +                        true
   1.433 +                        );
   1.434 +                    // </FS:LO>
   1.435 +
   1.436 +                    // <FS:Ansariel> Send inventory item on autoresponse
   1.437 +                    LLUUID item_id(gSavedPerAccountSettings.getString("FSAutoresponseItemUUID"));
   1.438 +                    if (item_id.notNull())
   1.439 +                    {
   1.440 +                        LLInventoryItem* item = dynamic_cast<LLInventoryItem*>(gInventory.getItem(item_id));
   1.441 +                        if (item)
   1.442 +                        {
   1.443 +                            gIMMgr->addMessage(
   1.444 +                                    session_id,
   1.445 +                                    gAgentID,
   1.446 +                                    LLStringUtil::null, // Pass null value so no name gets prepended
   1.447 +                                    LLTrans::getString("IM_autoresponse_item_sent", LLSD().with("[ITEM_NAME]", item->getName())),
   1.448 +                                    false,
   1.449 +                                    name,
   1.450 +                                    IM_NOTHING_SPECIAL,
   1.451 +                                    parent_estate_id,
   1.452 +                                    region_id,
   1.453 +                                    position,
   1.454 +                                    false,
   1.455 +                                    true);
   1.456 +                            LLGiveInventory::doGiveInventoryItem(from_id, item, session_id);
   1.457 +                        }
   1.458 +                    }
   1.459 +                    // </FS:Ansariel>
   1.460 +                }
   1.461 +            }
   1.462 +            else if (from_id.isNull())
   1.463 +            {
   1.464 +                LLSD args;
   1.465 +                args["MESSAGE"] = message;
   1.466 +                LLNotificationsUtil::add("SystemMessage", args);
   1.467 +            }
   1.468 +            else if (to_id.isNull())
   1.469 +            {
   1.470 +                // Message to everyone from GOD, look up the fullname since
   1.471 +                // server always slams name to legacy names
   1.472 +                LLAvatarNameCache::get(from_id, boost::bind(god_message_name_cb, _2, chat, message));
   1.473              }
   1.474              else
   1.475              {
   1.476 -                /*
   1.477 -                EXT-5099
   1.478 -                currently there is no way to store in history only...
   1.479 -                using  LLNotificationsUtil::add will add message to Nearby Chat
   1.480 +                // standard message, not from system
   1.481 +                std::string saved;
   1.482 +                if (offline == IM_OFFLINE)
   1.483 +                {
   1.484 +                    LLStringUtil::format_map_t args;
   1.485 +                    args["[LONG_TIMESTAMP]"] = formatted_time(timestamp);
   1.486 +                    saved = LLTrans::getString("Saved_message", args);
   1.487 +                }
   1.488 +                buffer = saved + message;
   1.489  
   1.490 -                // muted user, so don't start an IM session, just record line in chat
   1.491 -                // history.  Pretend the chat is from a local agent,
   1.492 -                // so it will go into the history but not be shown on screen.
   1.493 +                LL_DEBUGS("Messaging") << "session_id( " << session_id << " ), from_id( " << from_id << " )" << LL_ENDL;
   1.494  
   1.495 -                LLSD args;
   1.496 -                args["MESSAGE"] = buffer;
   1.497 -                LLNotificationsUtil::add("SystemMessageTip", args);
   1.498 -                */
   1.499 -                static LLCachedControl<bool> fsSendMutedAvatarResponse(gSavedPerAccountSettings, "FSSendMutedAvatarResponse");
   1.500 -                if (fsSendMutedAvatarResponse && (!accept_im_from_only_friend || is_friend))
   1.501 +                bool mute_im = is_muted;
   1.502 +                if (accept_im_from_only_friend && !is_friend)
   1.503                  {
   1.504 -                    std::string my_name;
   1.505 -                    LLAgentUI::buildFullname(my_name);
   1.506 -                    std::string response = gSavedPerAccountSettings.getString("FSMutedAvatarResponse");
   1.507 -                    pack_instant_message(
   1.508 -                        gMessageSystem,
   1.509 -                        gAgent.getID(),
   1.510 -                        FALSE,
   1.511 -                        gAgent.getSessionID(),
   1.512 -                        from_id,
   1.513 -                        my_name,
   1.514 -                        response,
   1.515 -                        IM_ONLINE,
   1.516 -                        IM_DO_NOT_DISTURB_AUTO_RESPONSE,
   1.517 -                        session_id);
   1.518 -                    gAgent.sendReliableMessage();
   1.519 +                    if (!gIMMgr->isNonFriendSessionNotified(session_id))
   1.520 +                    {
   1.521 +                        // <FS:Ansariel> Disable this - doesn't make sense it will be skipped by LLIMMgr::addMessage() anyway
   1.522 +                        //std::string message = LLTrans::getString("IM_unblock_only_groups_friends");
   1.523 +                        //gIMMgr->addMessage(session_id, from_id, name, message, IM_OFFLINE == offline);
   1.524 +                        // </FS:Ansariel>
   1.525 +                        gIMMgr->addNotifiedNonFriendSessionID(session_id);
   1.526 +                    }
   1.527 +
   1.528 +                    mute_im = true;
   1.529                  }
   1.530  
   1.531 -                // <FS:Ansariel> Don't flash for muted IMs
   1.532 -                return;
   1.533 +// [RLVa:KB] - Checked: 2010-11-30 (RLVa-1.3.0)
   1.534 +                // Don't block offline IMs, or IMs from Lindens
   1.535 +                if ( (rlv_handler_t::isEnabled()) && (offline != IM_OFFLINE) && (!RlvActions::canReceiveIM(from_id)) && (!LLMuteList::getInstance()->isLinden(original_name) ))
   1.536 +                {
   1.537 +                    if (!mute_im)
   1.538 +                        RlvUtil::sendBusyMessage(from_id, RlvStrings::getString(RLV_STRING_BLOCKED_RECVIM_REMOTE), session_id);
   1.539 +                    message = RlvStrings::getString(RLV_STRING_BLOCKED_RECVIM);
   1.540 +                }
   1.541 +// [/RLVa:KB]
   1.542 +
   1.543 +                if (!mute_im)
   1.544 +                {
   1.545 +                    // checkfor and process reqinfo
   1.546 +                    message = FSData::getInstance()->processRequestForInfo(from_id, message, name, session_id);
   1.547 +
   1.548 +                    // <FS:PP> FIRE-10178: Keyword Alerts in group IM do not work unless the group is in the foreground (notification on receipt of IM)
   1.549 +                    chat.mText = message;
   1.550 +                    bool keyword_alert_performed = false;
   1.551 +                    if (FSKeywords::getInstance()->chatContainsKeyword(chat, false))
   1.552 +                    {
   1.553 +                        FSKeywords::notify(chat);
   1.554 +                        keyword_alert_performed = true;
   1.555 +                    }
   1.556 +                    // </FS:PP>
   1.557 +
   1.558 +                    buffer = saved + message;
   1.559 +
   1.560 +                    gIMMgr->addMessage(
   1.561 +                        session_id,
   1.562 +                        from_id,
   1.563 +                        name,
   1.564 +                        buffer,
   1.565 +                        IM_OFFLINE == offline,
   1.566 +                        LLStringUtil::null,
   1.567 +                        dialog,
   1.568 +                        parent_estate_id,
   1.569 +                        region_id,
   1.570 +                        position,
   1.571 +                        true,
   1.572 +                        false,
   1.573 +                        keyword_alert_performed);
   1.574 +                }
   1.575 +                else
   1.576 +                {
   1.577 +                    /*
   1.578 +                    EXT-5099
   1.579 +                    */
   1.580 +                    static LLCachedControl<bool> fsSendMutedAvatarResponse(gSavedPerAccountSettings, "FSSendMutedAvatarResponse");
   1.581 +                    if (fsSendMutedAvatarResponse && (!accept_im_from_only_friend || is_friend))
   1.582 +                    {
   1.583 +                        std::string my_name;
   1.584 +                        LLAgentUI::buildFullname(my_name);
   1.585 +                        std::string response = gSavedPerAccountSettings.getString("FSMutedAvatarResponse");
   1.586 +                        pack_instant_message(
   1.587 +                            gMessageSystem,
   1.588 +                            gAgent.getID(),
   1.589 +                            FALSE,
   1.590 +                            gAgent.getSessionID(),
   1.591 +                            from_id,
   1.592 +                            my_name,
   1.593 +                            response,
   1.594 +                            IM_ONLINE,
   1.595 +                            IM_DO_NOT_DISTURB_AUTO_RESPONSE,
   1.596 +                            session_id);
   1.597 +                        gAgent.sendReliableMessage();
   1.598 +                    }
   1.599 +
   1.600 +                    // <FS:Ansariel> Don't flash for muted IMs
   1.601 +                    return;
   1.602 +                }
   1.603              }
   1.604 -        }
   1.605 -        break;
   1.606 +            break;
   1.607  
   1.608 -    case IM_TYPING_START:
   1.609 +        case IM_TYPING_START:
   1.610          {
   1.611              LLPointer<LLIMInfo> im_info = new LLIMInfo(gMessageSystem);
   1.612              gIMMgr->processIMTypingStart(im_info);
   1.613          }
   1.614          break;
   1.615  
   1.616 -    case IM_TYPING_STOP:
   1.617 +        case IM_TYPING_STOP:
   1.618          {
   1.619              LLPointer<LLIMInfo> im_info = new LLIMInfo(gMessageSystem);
   1.620              gIMMgr->processIMTypingStop(im_info);
   1.621          }
   1.622          break;
   1.623  
   1.624 -    case IM_MESSAGEBOX:
   1.625 +        case IM_MESSAGEBOX:
   1.626          {
   1.627              // This is a block, modeless dialog.
   1.628              args["MESSAGE"] = message;
   1.629              LLNotificationsUtil::add("SystemMessageTip", args);
   1.630          }
   1.631          break;
   1.632 -    case IM_GROUP_NOTICE:
   1.633 -    case IM_GROUP_NOTICE_REQUESTED:
   1.634 +        case IM_GROUP_NOTICE:
   1.635 +        case IM_GROUP_NOTICE_REQUESTED:
   1.636          {
   1.637              LL_INFOS("Messaging") << "Received IM_GROUP_NOTICE message." << LL_ENDL;
   1.638  
   1.639 @@ -1150,7 +1140,7 @@
   1.640              if (has_inventory)
   1.641              {
   1.642                  info = new LLOfferInfo();
   1.643 -                
   1.644 +
   1.645                  info->mIM = IM_GROUP_NOTICE;
   1.646                  info->mFromID = from_id;
   1.647                  info->mFromGroup = from_group;
   1.648 @@ -1171,7 +1161,7 @@
   1.649                  info->mDesc = item_name;
   1.650                  info->mHost = sender;
   1.651              }
   1.652 -            
   1.653 +
   1.654              std::string str(message);
   1.655  
   1.656              // Tokenize the string.
   1.657 @@ -1195,7 +1185,7 @@
   1.658                  payload["group_id"] = group_id;
   1.659                  payload["inventory_name"] = item_name;
   1.660                  payload["received_time"] = LLDate::now();
   1.661 -                if(info && info->asLLSD())
   1.662 +                if (info && info->asLLSD())
   1.663                  {
   1.664                      payload["inventory_offer"] = info->asLLSD();
   1.665                  }
   1.666 @@ -1218,8 +1208,8 @@
   1.667              // Also send down the old path for now.
   1.668              if (IM_GROUP_NOTICE_REQUESTED == dialog)
   1.669              {
   1.670 -                
   1.671 -                LLPanelGroup::showNotice(subj,mes,group_id,has_inventory,item_name,info);
   1.672 +
   1.673 +                LLPanelGroup::showNotice(subj, mes, group_id, has_inventory, item_name, info);
   1.674              }
   1.675              else
   1.676              {
   1.677 @@ -1227,7 +1217,7 @@
   1.678              }
   1.679          }
   1.680          break;
   1.681 -    case IM_GROUP_INVITATION:
   1.682 +        case IM_GROUP_INVITATION:
   1.683          {
   1.684              // <FS:Ansariel> FIRE-20385: Don't show group invitation for groups agent is already a member of
   1.685              if (gAgent.isInGroup(from_id) && !gSavedSettings.getBOOL("FSShowJoinedGroupInvitations"))
   1.686 @@ -1248,7 +1238,7 @@
   1.687              {
   1.688                  send_do_not_disturb_message(gMessageSystem, from_id);
   1.689              }
   1.690 -            
   1.691 +
   1.692              if (!is_muted)
   1.693              {
   1.694                  LL_INFOS("Messaging") << "Received IM_GROUP_INVITATION message." << LL_ENDL;
   1.695 @@ -1257,7 +1247,7 @@
   1.696                  {
   1.697                      S32 membership_fee;
   1.698                      LLUUID role_id;
   1.699 -                }* invite_bucket;
   1.700 +                }*invite_bucket;
   1.701  
   1.702                  // Make sure the binary bucket is the correct size.
   1.703                  if (binary_bucket_size != sizeof(invite_bucket_t))
   1.704 @@ -1305,9 +1295,9 @@
   1.705          }
   1.706          break;
   1.707  
   1.708 -    case IM_INVENTORY_OFFERED:
   1.709 -    case IM_TASK_INVENTORY_OFFERED:
   1.710 -        // Someone has offered us some inventory.
   1.711 +        case IM_INVENTORY_OFFERED:
   1.712 +        case IM_TASK_INVENTORY_OFFERED:
   1.713 +            // Someone has offered us some inventory.
   1.714          {
   1.715              LLOfferInfo* info = new LLOfferInfo;
   1.716              if (IM_INVENTORY_OFFERED == dialog)
   1.717 @@ -1316,7 +1306,7 @@
   1.718                  {
   1.719                      S8		asset_type;
   1.720                      LLUUID	object_id;
   1.721 -                }* bucketp;
   1.722 +                }*bucketp;
   1.723  
   1.724                  if (sizeof(offer_agent_bucket_t) != binary_bucket_size)
   1.725                  {
   1.726 @@ -1381,54 +1371,54 @@
   1.727          }
   1.728          break;
   1.729  
   1.730 -    case IM_INVENTORY_ACCEPTED:
   1.731 -    {
   1.732 -//      args["NAME"] = LLSLURL("agent", from_id, "completename").getSLURLString();;
   1.733 -//      args["ORIGINAL_NAME"] = original_name;
   1.734 +        case IM_INVENTORY_ACCEPTED:
   1.735 +        {
   1.736 +//          args["NAME"] = LLSLURL("agent", from_id, "completename").getSLURLString();;
   1.737 +//          args["ORIGINAL_NAME"] = original_name;
   1.738  // [RLVa:KB] - Checked: RLVa-1.2.2
   1.739 -        // Only anonymize the name if the agent is nearby, there isn't an open IM session to them and their profile isn't open
   1.740 -        LLAvatarName av_name;
   1.741 -        bool fRlvCanShowName = (!RlvActions::isRlvEnabled()) ||
   1.742 -            (RlvActions::canShowName(RlvActions::SNC_DEFAULT, from_id)) || (!RlvUtil::isNearbyAgent(from_id)) || (RlvUIEnabler::hasOpenProfile(from_id)) || (RlvUIEnabler::hasOpenIM(from_id));
   1.743 -        args["NAME"] = LLSLURL("agent", from_id, (fRlvCanShowName) ? "completename" : "rlvanonym").getSLURLString();;
   1.744 -        args["ORIGINAL_NAME"] = fRlvCanShowName ? original_name : (LLAvatarNameCache::get(from_id, &av_name) ? RlvStrings::getAnonym(av_name) : RlvStrings::getAnonym(original_name));
   1.745 +            // Only anonymize the name if the agent is nearby, there isn't an open IM session to them and their profile isn't open
   1.746 +            LLAvatarName av_name;
   1.747 +            bool fRlvCanShowName = (!RlvActions::isRlvEnabled()) ||
   1.748 +                (RlvActions::canShowName(RlvActions::SNC_DEFAULT, from_id)) || (!RlvUtil::isNearbyAgent(from_id)) || (RlvUIEnabler::hasOpenProfile(from_id)) || (RlvUIEnabler::hasOpenIM(from_id));
   1.749 +            args["NAME"] = LLSLURL("agent", from_id, (fRlvCanShowName) ? "completename" : "rlvanonym").getSLURLString();;
   1.750 +            args["ORIGINAL_NAME"] = fRlvCanShowName ? original_name : (LLAvatarNameCache::get(from_id, &av_name) ? RlvStrings::getAnonym(av_name) : RlvStrings::getAnonym(original_name));
   1.751  // [/RLVa:KB]
   1.752 -        LLSD payload;
   1.753 -        payload["from_id"] = from_id;
   1.754 -        // Passing the "SESSION_NAME" to use it for IM notification logging
   1.755 -        // in LLTipHandler::processNotification(). See STORM-941.
   1.756 -        payload["SESSION_NAME"] = name;
   1.757 -        LLNotificationsUtil::add("InventoryAccepted", args, payload);
   1.758 -        break;
   1.759 -    }
   1.760 -    case IM_INVENTORY_DECLINED:
   1.761 -    {
   1.762 -//      args["NAME"] = LLSLURL("agent", from_id, "completename").getSLURLString();;
   1.763 +            LLSD payload;
   1.764 +            payload["from_id"] = from_id;
   1.765 +            // Passing the "SESSION_NAME" to use it for IM notification logging
   1.766 +            // in LLTipHandler::processNotification(). See STORM-941.
   1.767 +            payload["SESSION_NAME"] = name;
   1.768 +            LLNotificationsUtil::add("InventoryAccepted", args, payload);
   1.769 +            break;
   1.770 +        }
   1.771 +        case IM_INVENTORY_DECLINED:
   1.772 +        {
   1.773 +//          args["NAME"] = LLSLURL("agent", from_id, "completename").getSLURLString();;
   1.774  // [RLVa:KB] - Checked: RLVa-1.2.2
   1.775 -        // Only anonymize the name if the agent is nearby, there isn't an open IM session to them and their profile isn't open
   1.776 -        bool fRlvCanShowName = (!RlvActions::isRlvEnabled()) ||
   1.777 -            (RlvActions::canShowName(RlvActions::SNC_DEFAULT, from_id)) || (!RlvUtil::isNearbyAgent(from_id)) || (RlvUIEnabler::hasOpenProfile(from_id)) || (RlvUIEnabler::hasOpenIM(from_id));
   1.778 -        args["NAME"] = LLSLURL("agent", from_id, (fRlvCanShowName) ? "completename" : "rlvanonym").getSLURLString();;
   1.779 +            // Only anonymize the name if the agent is nearby, there isn't an open IM session to them and their profile isn't open
   1.780 +            bool fRlvCanShowName = (!RlvActions::isRlvEnabled()) ||
   1.781 +                (RlvActions::canShowName(RlvActions::SNC_DEFAULT, from_id)) || (!RlvUtil::isNearbyAgent(from_id)) || (RlvUIEnabler::hasOpenProfile(from_id)) || (RlvUIEnabler::hasOpenIM(from_id));
   1.782 +            args["NAME"] = LLSLURL("agent", from_id, (fRlvCanShowName) ? "completename" : "rlvanonym").getSLURLString();;
   1.783  // [/RLVa:KB]
   1.784 -        LLSD payload;
   1.785 -        payload["from_id"] = from_id;
   1.786 -        LLNotificationsUtil::add("InventoryDeclined", args, payload);
   1.787 -        break;
   1.788 -    }
   1.789 -    // TODO: _DEPRECATED suffix as part of vote removal - DEV-24856
   1.790 -    case IM_GROUP_VOTE:
   1.791 +            LLSD payload;
   1.792 +            payload["from_id"] = from_id;
   1.793 +            LLNotificationsUtil::add("InventoryDeclined", args, payload);
   1.794 +            break;
   1.795 +        }
   1.796 +        // TODO: _DEPRECATED suffix as part of vote removal - DEV-24856
   1.797 +        case IM_GROUP_VOTE:
   1.798          {
   1.799              LL_WARNS("Messaging") << "Received IM: IM_GROUP_VOTE_DEPRECATED" << LL_ENDL;
   1.800          }
   1.801          break;
   1.802  
   1.803 -    case IM_GROUP_ELECTION_DEPRECATED:
   1.804 -    {
   1.805 -        LL_WARNS("Messaging") << "Received IM: IM_GROUP_ELECTION_DEPRECATED" << LL_ENDL;
   1.806 -    }
   1.807 -    break;
   1.808 -    
   1.809 -    case IM_FROM_TASK:
   1.810 +        case IM_GROUP_ELECTION_DEPRECATED:
   1.811 +        {
   1.812 +            LL_WARNS("Messaging") << "Received IM: IM_GROUP_ELECTION_DEPRECATED" << LL_ENDL;
   1.813 +        }
   1.814 +        break;
   1.815 +
   1.816 +        case IM_FROM_TASK:
   1.817          {
   1.818  
   1.819              if (is_do_not_disturb && !is_owned_by_me)
   1.820 @@ -1471,7 +1461,7 @@
   1.821              // enough to check only from name (i.e. fromName = "Second Life"). For example
   1.822              // source type of messages from objects called "Second Life" should not be CHAT_SOURCE_SYSTEM.
   1.823              bool chat_from_system = (SYSTEM_FROM == name) && region_id.isNull() && position.isNull();
   1.824 -            if(chat_from_system)
   1.825 +            if (chat_from_system)
   1.826              {
   1.827                  // System's UUID is NULL (fixes EXT-4766)
   1.828                  chat.mFromID = LLUUID::null;
   1.829 @@ -1507,9 +1497,9 @@
   1.830              if (from_group)
   1.831              {
   1.832                  query_string["groupowned"] = "true";
   1.833 -            }	
   1.834 +            }
   1.835  
   1.836 -//          chat.mURL = LLSLURL("objectim", session_id, "").getSLURLString();
   1.837 +//              chat.mURL = LLSLURL("objectim", session_id, "").getSLURLString();
   1.838  // [SL:KB] - Checked: 2010-11-02 (RLVa-1.2.2a) | Added: RLVa-1.2.2a
   1.839              chat.mURL = LLSLURL("objectim", session_id, LLURI::mapToQueryString(query_string)).getSLURLString();
   1.840  // [/SL:KB]
   1.841 @@ -1528,7 +1518,7 @@
   1.842              //LLFloaterIMNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance<LLFloaterIMNearbyChat>("nearby_chat");
   1.843              FSFloaterNearbyChat* nearby_chat = FSFloaterNearbyChat::getInstance();
   1.844              // </FS:Ansariel> [FS communication UI]
   1.845 -            if(!chat_from_system && nearby_chat)
   1.846 +            if (!chat_from_system && nearby_chat)
   1.847              {
   1.848                  chat.mOwnerID = from_id;
   1.849                  LLSD args;
   1.850 @@ -1550,7 +1540,7 @@
   1.851  
   1.852              //Object IMs send with from name: 'Second Life' need to be displayed also in notification toasts (EXT-1590)
   1.853              if (!chat_from_system) break;
   1.854 -            
   1.855 +
   1.856              LLSD substitutions;
   1.857              substitutions["NAME"] = name;
   1.858              substitutions["MSG"] = message;
   1.859 @@ -1571,128 +1561,128 @@
   1.860          }
   1.861          break;
   1.862  
   1.863 -    case IM_SESSION_SEND:		// ad-hoc or group IMs
   1.864 +        case IM_SESSION_SEND:		// ad-hoc or group IMs
   1.865  
   1.866 -        // Only show messages if we have a session open (which
   1.867 -        // should happen after you get an "invitation"
   1.868 +            // Only show messages if we have a session open (which
   1.869 +            // should happen after you get an "invitation"
   1.870  // [SL:KB] - Patch: Chat-GroupSnooze | Checked: 2012-06-16 (Catznip-3.3)
   1.871 -        //if ( !gIMMgr->hasSession(session_id) )
   1.872 -        if ( (!gIMMgr->hasSession(session_id)) &&
   1.873 -             ( (!gAgent.isInGroup(session_id)) || (!gIMMgr->checkSnoozeExpiration(session_id)) || LLAvatarActions::isBlocked(from_id) || (!gIMMgr->restoreSnoozedSession(session_id)) ) )
   1.874 +            //if ( !gIMMgr->hasSession(session_id) )
   1.875 +            if ( (!gIMMgr->hasSession(session_id)) &&
   1.876 +                 ( (!gAgent.isInGroup(session_id)) || (!gIMMgr->checkSnoozeExpiration(session_id)) || LLAvatarActions::isBlocked(from_id) || (!gIMMgr->restoreSnoozedSession(session_id)) ) )
   1.877  // [/SL:KB]
   1.878 -        {
   1.879 -            return;
   1.880 -        }
   1.881 -
   1.882 -        else if (offline == IM_ONLINE && is_do_not_disturb)
   1.883 -        {
   1.884 -
   1.885 -            // return a standard "do not disturb" message, but only do it to online IM 
   1.886 -            // (i.e. not other auto responses and not store-and-forward IM)
   1.887 -            if (!gIMMgr->hasSession(session_id))
   1.888              {
   1.889 -                // if there is not a panel for this conversation (i.e. it is a new IM conversation
   1.890 -                // initiated by the other party) then...
   1.891 -                send_do_not_disturb_message(gMessageSystem, from_id, session_id);
   1.892 +                return;
   1.893              }
   1.894  
   1.895 -            // now store incoming IM in chat history
   1.896 +            else if (offline == IM_ONLINE && is_do_not_disturb)
   1.897 +            {
   1.898  
   1.899 -            buffer = message;
   1.900 -    
   1.901 -            LL_DEBUGS("Messaging") << "message in dnd; session_id( " << session_id << " ), from_id( " << from_id << " )" << LL_ENDL;
   1.902 +                // return a standard "do not disturb" message, but only do it to online IM 
   1.903 +                // (i.e. not other auto responses and not store-and-forward IM)
   1.904 +                if (!gIMMgr->hasSession(session_id))
   1.905 +                {
   1.906 +                    // if there is not a panel for this conversation (i.e. it is a new IM conversation
   1.907 +                    // initiated by the other party) then...
   1.908 +                    send_do_not_disturb_message(gMessageSystem, from_id, session_id);
   1.909 +                }
   1.910  
   1.911 -            // add to IM panel, but do not bother the user
   1.912 -            gIMMgr->addMessage(
   1.913 -                session_id,
   1.914 -                from_id,
   1.915 -                name,
   1.916 -                buffer,
   1.917 -                IM_OFFLINE == offline,
   1.918 -                ll_safe_string((char*)binary_bucket),
   1.919 -                IM_SESSION_INVITE,
   1.920 -                parent_estate_id,
   1.921 -                region_id,
   1.922 -                position,
   1.923 -                true);
   1.924 -        }
   1.925 -        else
   1.926 -        {
   1.927 +                // now store incoming IM in chat history
   1.928  
   1.929 -            // <FS:PP> FIRE-10178: Keyword Alerts in group IM do not work unless the group is in the foreground (notification on receipt of IM)
   1.930 -            chat.mText = message;
   1.931 -            bool keyword_alert_performed = false;
   1.932 -            if (FSKeywords::getInstance()->chatContainsKeyword(chat, false))
   1.933 +                buffer = message;
   1.934 +
   1.935 +                LL_DEBUGS("Messaging") << "message in dnd; session_id( " << session_id << " ), from_id( " << from_id << " )" << LL_ENDL;
   1.936 +
   1.937 +                // add to IM panel, but do not bother the user
   1.938 +                gIMMgr->addMessage(
   1.939 +                    session_id,
   1.940 +                    from_id,
   1.941 +                    name,
   1.942 +                    buffer,
   1.943 +                    IM_OFFLINE == offline,
   1.944 +                    ll_safe_string((char*)binary_bucket),
   1.945 +                    IM_SESSION_INVITE,
   1.946 +                    parent_estate_id,
   1.947 +                    region_id,
   1.948 +                    position,
   1.949 +                    true);
   1.950 +            }
   1.951 +            else
   1.952              {
   1.953 -                FSKeywords::notify(chat);
   1.954 -                keyword_alert_performed = true;
   1.955 +
   1.956 +                // <FS:PP> FIRE-10178: Keyword Alerts in group IM do not work unless the group is in the foreground (notification on receipt of IM)
   1.957 +                chat.mText = message;
   1.958 +                bool keyword_alert_performed = false;
   1.959 +                if (FSKeywords::getInstance()->chatContainsKeyword(chat, false))
   1.960 +                {
   1.961 +                    FSKeywords::notify(chat);
   1.962 +                    keyword_alert_performed = true;
   1.963 +                }
   1.964 +                // </FS:PP>
   1.965 +
   1.966 +                // standard message, not from system
   1.967 +                std::string saved;
   1.968 +                if (offline == IM_OFFLINE)
   1.969 +                {
   1.970 +                    saved = llformat("(Saved %s) ", formatted_time(timestamp).c_str());
   1.971 +                }
   1.972 +
   1.973 +                buffer = saved + message;
   1.974 +
   1.975 +                LL_DEBUGS("Messaging") << "standard message session_id( " << session_id << " ), from_id( " << from_id << " )" << LL_ENDL;
   1.976 +
   1.977 +                gIMMgr->addMessage(
   1.978 +                    session_id,
   1.979 +                    from_id,
   1.980 +                    name,
   1.981 +                    buffer,
   1.982 +                    IM_OFFLINE == offline,
   1.983 +                    ll_safe_string((char*)binary_bucket),
   1.984 +                    IM_SESSION_INVITE,
   1.985 +                    parent_estate_id,
   1.986 +                    region_id,
   1.987 +                    position,
   1.988 +                    true,
   1.989 +                    false,
   1.990 +                    keyword_alert_performed);
   1.991              }
   1.992 -            // </FS:PP>
   1.993 +            break;
   1.994  
   1.995 -            // standard message, not from system
   1.996 -            std::string saved;
   1.997 -            if(offline == IM_OFFLINE)
   1.998 +        case IM_FROM_TASK_AS_ALERT:
   1.999 +            if (is_do_not_disturb && !is_owned_by_me)
  1.1000              {
  1.1001 -                saved = llformat("(Saved %s) ", formatted_time(timestamp).c_str());
  1.1002 +                return;
  1.1003              }
  1.1004 +            {
  1.1005 +                // Construct a viewer alert for this message.
  1.1006 +                args["NAME"] = name;
  1.1007 +                args["MESSAGE"] = message;
  1.1008 +                LLNotificationsUtil::add("ObjectMessage", args);
  1.1009 +            }
  1.1010 +            break;
  1.1011 +        case IM_DO_NOT_DISTURB_AUTO_RESPONSE:
  1.1012 +            if (is_muted)
  1.1013 +            {
  1.1014 +                LL_DEBUGS("Messaging") << "Ignoring do-not-disturb response from " << from_id << LL_ENDL;
  1.1015 +                return;
  1.1016 +            }
  1.1017 +            else
  1.1018 +            {
  1.1019 +                // <FS:Ansariel> FIRE-12908: Add busy response indicator back to busy messages
  1.1020 +                //gIMMgr->addMessage(session_id, from_id, name, message);
  1.1021 +                buffer = llformat("(%s): %s", LLTrans::getString("BusyResponse").c_str(), message.c_str());
  1.1022 +                gIMMgr->addMessage(session_id, from_id, name, buffer);
  1.1023 +                // </FS:Ansariel>
  1.1024 +            }
  1.1025 +            break;
  1.1026  
  1.1027 -            buffer = saved + message;
  1.1028 -
  1.1029 -            LL_DEBUGS("Messaging") << "standard message session_id( " << session_id << " ), from_id( " << from_id << " )" << LL_ENDL;
  1.1030 -
  1.1031 -            gIMMgr->addMessage(
  1.1032 -                session_id,
  1.1033 -                from_id,
  1.1034 -                name,
  1.1035 -                buffer,
  1.1036 -                IM_OFFLINE == offline,
  1.1037 -                ll_safe_string((char*)binary_bucket),
  1.1038 -                IM_SESSION_INVITE,
  1.1039 -                parent_estate_id,
  1.1040 -                region_id,
  1.1041 -                position,
  1.1042 -                true,
  1.1043 -                false,
  1.1044 -                keyword_alert_performed);
  1.1045 -        }
  1.1046 -        break;
  1.1047 -
  1.1048 -    case IM_FROM_TASK_AS_ALERT:
  1.1049 -        if (is_do_not_disturb && !is_owned_by_me)
  1.1050 -        {
  1.1051 -            return;
  1.1052 -        }
  1.1053 -        {
  1.1054 -            // Construct a viewer alert for this message.
  1.1055 -            args["NAME"] = name;
  1.1056 -            args["MESSAGE"] = message;
  1.1057 -            LLNotificationsUtil::add("ObjectMessage", args);
  1.1058 -        }
  1.1059 -        break;
  1.1060 -    case IM_DO_NOT_DISTURB_AUTO_RESPONSE:
  1.1061 -        if (is_muted)
  1.1062 -        {
  1.1063 -            LL_DEBUGS("Messaging") << "Ignoring do-not-disturb response from " << from_id << LL_ENDL;
  1.1064 -            return;
  1.1065 -        }
  1.1066 -        else
  1.1067 -        {
  1.1068 -            // <FS:Ansariel> FIRE-12908: Add busy response indicator back to busy messages
  1.1069 -            //gIMMgr->addMessage(session_id, from_id, name, message);
  1.1070 -            buffer = llformat("(%s): %s", LLTrans::getString("BusyResponse").c_str(), message.c_str());
  1.1071 -            gIMMgr->addMessage(session_id, from_id, name, buffer);
  1.1072 -            // </FS:Ansariel>
  1.1073 -        }
  1.1074 -        break;
  1.1075 -        
  1.1076 -    case IM_LURE_USER:
  1.1077 -    case IM_TELEPORT_REQUEST:
  1.1078 +        case IM_LURE_USER:
  1.1079 +        case IM_TELEPORT_REQUEST:
  1.1080          {
  1.1081  // [RLVa:KB] - Checked: RLVa-1.4.9
  1.1082              // If we auto-accept the offer/request then this will override DnD status (but we'll still let the other party know later)
  1.1083              bool fRlvAutoAccept = (rlv_handler_t::isEnabled()) &&
  1.1084                  ( ((IM_LURE_USER == dialog) && (RlvActions::autoAcceptTeleportOffer(from_id))) ||
  1.1085 -                  ((IM_TELEPORT_REQUEST == dialog) && (RlvActions::autoAcceptTeleportRequest(from_id))) );
  1.1086 +                    ((IM_TELEPORT_REQUEST == dialog) && (RlvActions::autoAcceptTeleportRequest(from_id))) );
  1.1087  // [/RLVa:KB]
  1.1088  
  1.1089              if (is_muted)
  1.1090 @@ -1712,7 +1702,7 @@
  1.1091              // </FS:PP>
  1.1092              else
  1.1093              {
  1.1094 -//              if (is_do_not_disturb)
  1.1095 +//                  if (is_do_not_disturb)
  1.1096  // [RLVa:KB] - Checked: RLVa-1.4.9
  1.1097                  if ( (is_do_not_disturb) && (!fRlvAutoAccept) )
  1.1098  // [/RLVa:KB]
  1.1099 @@ -1726,7 +1716,7 @@
  1.1100                  std::string region_info = ll_safe_string((char*)binary_bucket, binary_bucket_size);
  1.1101                  std::string region_access_str = LLStringUtil::null;
  1.1102                  std::string region_access_icn = LLStringUtil::null;
  1.1103 -                std::string region_access_lc  = LLStringUtil::null;
  1.1104 +                std::string region_access_lc = LLStringUtil::null;
  1.1105  
  1.1106                  bool canUserAccessDstRegion = true;
  1.1107                  bool doesUserRequireMaturityIncrease = false;
  1.1108 @@ -1736,39 +1726,39 @@
  1.1109                  {
  1.1110                      region_access_str = LLViewerRegion::accessToString(region_access);
  1.1111                      region_access_icn = LLViewerRegion::getAccessIcon(region_access);
  1.1112 -                    region_access_lc  = region_access_str;
  1.1113 +                    region_access_lc = region_access_str;
  1.1114                      LLStringUtil::toLower(region_access_lc);
  1.1115  
  1.1116                      if (!gAgent.isGodlike())
  1.1117                      {
  1.1118                          switch (region_access)
  1.1119                          {
  1.1120 -                        case SIM_ACCESS_MIN :
  1.1121 -                        case SIM_ACCESS_PG :
  1.1122 -                            break;
  1.1123 -                        case SIM_ACCESS_MATURE :
  1.1124 -                            if (gAgent.isTeen())
  1.1125 -                            {
  1.1126 -                                canUserAccessDstRegion = false;
  1.1127 -                            }
  1.1128 -                            else if (gAgent.prefersPG())
  1.1129 -                            {
  1.1130 -                                doesUserRequireMaturityIncrease = true;
  1.1131 -                            }
  1.1132 -                            break;
  1.1133 -                        case SIM_ACCESS_ADULT :
  1.1134 -                            if (!gAgent.isAdult())
  1.1135 -                            {
  1.1136 -                                canUserAccessDstRegion = false;
  1.1137 -                            }
  1.1138 -                            else if (!gAgent.prefersAdult())
  1.1139 -                            {
  1.1140 -                                doesUserRequireMaturityIncrease = true;
  1.1141 -                            }
  1.1142 -                            break;
  1.1143 -                        default :
  1.1144 -                            llassert(0);
  1.1145 -                            break;
  1.1146 +                            case SIM_ACCESS_MIN:
  1.1147 +                            case SIM_ACCESS_PG:
  1.1148 +                                break;
  1.1149 +                            case SIM_ACCESS_MATURE:
  1.1150 +                                if (gAgent.isTeen())
  1.1151 +                                {
  1.1152 +                                    canUserAccessDstRegion = false;
  1.1153 +                                }
  1.1154 +                                else if (gAgent.prefersPG())
  1.1155 +                                {
  1.1156 +                                    doesUserRequireMaturityIncrease = true;
  1.1157 +                                }
  1.1158 +                                break;
  1.1159 +                            case SIM_ACCESS_ADULT:
  1.1160 +                                if (!gAgent.isAdult())
  1.1161 +                                {
  1.1162 +                                    canUserAccessDstRegion = false;
  1.1163 +                                }
  1.1164 +                                else if (!gAgent.prefersAdult())
  1.1165 +                                {
  1.1166 +                                    doesUserRequireMaturityIncrease = true;
  1.1167 +                                }
  1.1168 +                                break;
  1.1169 +                            default:
  1.1170 +                                llassert(0);
  1.1171 +                                break;
  1.1172                          }
  1.1173                      }
  1.1174                  }
  1.1175 @@ -1777,7 +1767,7 @@
  1.1176                  if (rlv_handler_t::isEnabled())
  1.1177                  {
  1.1178                      if ( ((IM_LURE_USER == dialog) && (!RlvActions::canAcceptTpOffer(from_id))) ||
  1.1179 -                         ((IM_TELEPORT_REQUEST == dialog) && (!RlvActions::canAcceptTpRequest(from_id))) )
  1.1180 +                            ((IM_TELEPORT_REQUEST == dialog) && (!RlvActions::canAcceptTpRequest(from_id))) )
  1.1181                      {
  1.1182                          RlvUtil::sendBusyMessage(from_id, RlvStrings::getString(RLV_STRING_BLOCKED_TPLUREREQ_REMOTE));
  1.1183                          if (is_do_not_disturb)
  1.1184 @@ -1787,7 +1777,7 @@
  1.1185  
  1.1186                      // Censor message if: 1) restricted from receiving IMs from the sender, or 2) teleport offer/request and @showloc=n restricted
  1.1187                      if ( (!RlvActions::canReceiveIM(from_id)) || 
  1.1188 -                         ((gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) && (IM_LURE_USER == dialog || IM_TELEPORT_REQUEST == dialog)) )
  1.1189 +                            ((gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) && (IM_LURE_USER == dialog || IM_TELEPORT_REQUEST == dialog)) )
  1.1190                      {
  1.1191                          message = RlvStrings::getString(RLV_STRING_HIDDEN);
  1.1192                      }
  1.1193 @@ -1825,7 +1815,7 @@
  1.1194                      LLNotification::Params params("TeleportOffered_MaturityBlocked");
  1.1195                      params.substitutions = args;
  1.1196                      params.payload = payload;
  1.1197 -                    LLPostponedNotification::add<LLPostponedOfferNotification>(	params, from_id, false);
  1.1198 +                    LLPostponedNotification::add<LLPostponedOfferNotification>(params, from_id, false);
  1.1199                      send_simple_im(from_id, LLTrans::getString("TeleportMaturityExceeded"), IM_NOTHING_SPECIAL, session_id);
  1.1200                      send_simple_im(from_id, LLStringUtil::null, IM_LURE_DECLINED, session_id);
  1.1201                  }
  1.1202 @@ -1834,7 +1824,7 @@
  1.1203                      LLNotification::Params params("TeleportOffered_MaturityExceeded");
  1.1204                      params.substitutions = args;
  1.1205                      params.payload = payload;
  1.1206 -                    LLPostponedNotification::add<LLPostponedOfferNotification>(	params, from_id, false);
  1.1207 +                    LLPostponedNotification::add<LLPostponedOfferNotification>(params, from_id, false);
  1.1208                  }
  1.1209                  else
  1.1210                  {
  1.1211 @@ -1867,13 +1857,13 @@
  1.1212                          LLPostponedNotification::add<LLPostponedOfferNotification>(params, from_id, false);
  1.1213                      }
  1.1214  // [/RLVa:KB]
  1.1215 -//                  LLPostponedNotification::add<LLPostponedOfferNotification>(params, from_id, false);
  1.1216 +//                      LLPostponedNotification::add<LLPostponedOfferNotification>(params, from_id, false);
  1.1217                  }
  1.1218              }
  1.1219          }
  1.1220          break;
  1.1221  
  1.1222 -    case IM_GODLIKE_LURE_USER:
  1.1223 +        case IM_GODLIKE_LURE_USER:
  1.1224          {
  1.1225              LLVector3 pos, look_at;
  1.1226              U64 region_handle(0);
  1.1227 @@ -1881,7 +1871,7 @@
  1.1228              std::string region_info = ll_safe_string((char*)binary_bucket, binary_bucket_size);
  1.1229              std::string region_access_str = LLStringUtil::null;
  1.1230              std::string region_access_icn = LLStringUtil::null;
  1.1231 -            std::string region_access_lc  = LLStringUtil::null;
  1.1232 +            std::string region_access_lc = LLStringUtil::null;
  1.1233  
  1.1234              bool canUserAccessDstRegion = true;
  1.1235              bool doesUserRequireMaturityIncrease = false;
  1.1236 @@ -1890,39 +1880,39 @@
  1.1237              {
  1.1238                  region_access_str = LLViewerRegion::accessToString(region_access);
  1.1239                  region_access_icn = LLViewerRegion::getAccessIcon(region_access);
  1.1240 -                region_access_lc  = region_access_str;
  1.1241 +                region_access_lc = region_access_str;
  1.1242                  LLStringUtil::toLower(region_access_lc);
  1.1243  
  1.1244                  if (!gAgent.isGodlike())
  1.1245                  {
  1.1246                      switch (region_access)
  1.1247                      {
  1.1248 -                    case SIM_ACCESS_MIN :
  1.1249 -                    case SIM_ACCESS_PG :
  1.1250 -                        break;
  1.1251 -                    case SIM_ACCESS_MATURE :
  1.1252 -                        if (gAgent.isTeen())
  1.1253 -                        {
  1.1254 -                            canUserAccessDstRegion = false;
  1.1255 -                        }
  1.1256 -                        else if (gAgent.prefersPG())
  1.1257 -                        {
  1.1258 -                            doesUserRequireMaturityIncrease = true;
  1.1259 -                        }
  1.1260 -                        break;
  1.1261 -                    case SIM_ACCESS_ADULT :
  1.1262 -                        if (!gAgent.isAdult())
  1.1263 -                        {
  1.1264 -                            canUserAccessDstRegion = false;
  1.1265 -                        }
  1.1266 -                        else if (!gAgent.prefersAdult())
  1.1267 -                        {
  1.1268 -                            doesUserRequireMaturityIncrease = true;
  1.1269 -                        }
  1.1270 -                        break;
  1.1271 -                    default :
  1.1272 -                        llassert(0);
  1.1273 -                        break;
  1.1274 +                        case SIM_ACCESS_MIN:
  1.1275 +                        case SIM_ACCESS_PG:
  1.1276 +                            break;
  1.1277 +                        case SIM_ACCESS_MATURE:
  1.1278 +                            if (gAgent.isTeen())
  1.1279 +                            {
  1.1280 +                                canUserAccessDstRegion = false;
  1.1281 +                            }
  1.1282 +                            else if (gAgent.prefersPG())
  1.1283 +                            {
  1.1284 +                                doesUserRequireMaturityIncrease = true;
  1.1285 +                            }
  1.1286 +                            break;
  1.1287 +                        case SIM_ACCESS_ADULT:
  1.1288 +                            if (!gAgent.isAdult())
  1.1289 +                            {
  1.1290 +                                canUserAccessDstRegion = false;
  1.1291 +                            }
  1.1292 +                            else if (!gAgent.prefersAdult())
  1.1293 +                            {
  1.1294 +                                doesUserRequireMaturityIncrease = true;
  1.1295 +                            }
  1.1296 +                            break;
  1.1297 +                        default:
  1.1298 +                            llassert(0);
  1.1299 +                            break;
  1.1300                      }
  1.1301                  }
  1.1302              }
  1.1303 @@ -1945,7 +1935,7 @@
  1.1304                  LLNotification::Params params("TeleportOffered_MaturityBlocked");
  1.1305                  params.substitutions = args;
  1.1306                  params.payload = payload;
  1.1307 -                LLPostponedNotification::add<LLPostponedOfferNotification>(	params, from_id, false);
  1.1308 +                LLPostponedNotification::add<LLPostponedOfferNotification>(params, from_id, false);
  1.1309                  send_simple_im(from_id, LLTrans::getString("TeleportMaturityExceeded"), IM_NOTHING_SPECIAL, session_id);
  1.1310                  send_simple_im(from_id, LLStringUtil::null, IM_LURE_DECLINED, session_id);
  1.1311              }
  1.1312 @@ -1954,18 +1944,18 @@
  1.1313                  LLNotification::Params params("TeleportOffered_MaturityExceeded");
  1.1314                  params.substitutions = args;
  1.1315                  params.payload = payload;
  1.1316 -                LLPostponedNotification::add<LLPostponedOfferNotification>(	params, from_id, false);
  1.1317 +                LLPostponedNotification::add<LLPostponedOfferNotification>(params, from_id, false);
  1.1318              }
  1.1319              else
  1.1320              {
  1.1321 -            // do not show a message box, because you're about to be
  1.1322 -            // teleported.
  1.1323 -            LLNotifications::instance().forceResponse(LLNotification::Params("TeleportOffered").payload(payload), 0);
  1.1324 -        }
  1.1325 +                // do not show a message box, because you're about to be
  1.1326 +                // teleported.
  1.1327 +                LLNotifications::instance().forceResponse(LLNotification::Params("TeleportOffered").payload(payload), 0);
  1.1328 +            }
  1.1329          }
  1.1330          break;
  1.1331  
  1.1332 -    case IM_GOTO_URL:
  1.1333 +        case IM_GOTO_URL:
  1.1334          {
  1.1335              LLSD args;
  1.1336              // n.b. this is for URLs sent by the system, not for
  1.1337 @@ -1985,11 +1975,11 @@
  1.1338              args["URL"] = url;
  1.1339              LLSD payload;
  1.1340              payload["url"] = url;
  1.1341 -            LLNotificationsUtil::add("GotoURL", args, payload );
  1.1342 +            LLNotificationsUtil::add("GotoURL", args, payload);
  1.1343          }
  1.1344          break;
  1.1345  
  1.1346 -    case IM_FRIENDSHIP_OFFERED:
  1.1347 +        case IM_FRIENDSHIP_OFFERED:
  1.1348          {
  1.1349  
  1.1350              // <FS:PP> FIRE-15233: Automatic friendship request refusal
  1.1351 @@ -2036,37 +2026,37 @@
  1.1352  
  1.1353                  if (add_notification)
  1.1354                  {
  1.1355 -                if(message.empty())
  1.1356 -                {
  1.1357 -                    //support for frienship offers from clients before July 2008
  1.1358 +                    if (message.empty())
  1.1359 +                    {
  1.1360 +                        //support for frienship offers from clients before July 2008
  1.1361                          LLNotificationsUtil::add("OfferFriendshipNoMessage", args, payload);
  1.1362                          make_ui_sound("UISndFriendshipOffer"); // <FS:PP> Friendship offer sound
  1.1363 -                }
  1.1364 -                else
  1.1365 -                {
  1.1366 -                    args["[MESSAGE]"] = message;
  1.1367 -                    LLNotification::Params params("OfferFriendship");
  1.1368 -                    params.substitutions = args;
  1.1369 -                    params.payload = payload;
  1.1370 -                    LLPostponedNotification::add<LLPostponedOfferNotification>(	params, from_id, false);
  1.1371 -                    make_ui_sound("UISndFriendshipOffer"); // <FS:PP> Friendship offer sound
  1.1372 +                    }
  1.1373 +                    else
  1.1374 +                    {
  1.1375 +                        args["[MESSAGE]"] = message;
  1.1376 +                        LLNotification::Params params("OfferFriendship");
  1.1377 +                        params.substitutions = args;
  1.1378 +                        params.payload = payload;
  1.1379 +                        LLPostponedNotification::add<LLPostponedOfferNotification>(params, from_id, false);
  1.1380 +                        make_ui_sound("UISndFriendshipOffer"); // <FS:PP> Friendship offer sound
  1.1381 +                    }
  1.1382                  }
  1.1383              }
  1.1384          }
  1.1385 -        }
  1.1386          break;
  1.1387  
  1.1388 -    case IM_FRIENDSHIP_ACCEPTED:
  1.1389 +        case IM_FRIENDSHIP_ACCEPTED:
  1.1390          {
  1.1391              // In the case of an offline IM, the formFriendship() may be extraneous
  1.1392              // as the database should already include the relationship.  But it
  1.1393              // doesn't hurt for dupes.
  1.1394              LLAvatarTracker::formFriendship(from_id);
  1.1395 -            
  1.1396 +
  1.1397              std::vector<std::string> strings;
  1.1398              strings.push_back(from_id.asString());
  1.1399              send_generic_message("requestonlinenotification", strings);
  1.1400 -            
  1.1401 +
  1.1402              args["NAME"] = name;
  1.1403              LLSD payload;
  1.1404              payload["from_id"] = from_id;
  1.1405 @@ -2074,11 +2064,11 @@
  1.1406          }
  1.1407          break;
  1.1408  
  1.1409 -    case IM_FRIENDSHIP_DECLINED_DEPRECATED:
  1.1410 -    default:
  1.1411 -        LL_WARNS("Messaging") << "Instant message calling for unknown dialog "
  1.1412 +        case IM_FRIENDSHIP_DECLINED_DEPRECATED:
  1.1413 +        default:
  1.1414 +            LL_WARNS("Messaging") << "Instant message calling for unknown dialog "
  1.1415                  << (S32)dialog << LL_ENDL;
  1.1416 -        break;
  1.1417 +            break;
  1.1418      }
  1.1419  
  1.1420      LLWindow* viewer_window = gViewerWindow->getWindow();

mercurial