From 28d861d98256d4bb15006f81e533f457f0939c9d Mon Sep 17 00:00:00 2001 From: Ansariel Date: Thu, 19 Nov 2015 17:02:06 +0100 Subject: [PATCH] Small cleanup in FSConsoleUtils --- indra/newview/fsconsoleutils.cpp | 14 ++------------ indra/newview/fsconsoleutils.h | 2 -- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/indra/newview/fsconsoleutils.cpp b/indra/newview/fsconsoleutils.cpp index 11ba9cc549..676797335c 100644 --- a/indra/newview/fsconsoleutils.cpp +++ b/indra/newview/fsconsoleutils.cpp @@ -30,22 +30,14 @@ #include "fsconsoleutils.h" #include "fscommon.h" -#include "fsfloaternearbychat.h" #include "llagent.h" #include "llavatarnamecache.h" #include "llconsole.h" -#include "llfloaterreg.h" #include "llimview.h" #include "lltrans.h" +#include "llviewerchat.h" #include "llviewercontrol.h" -// static -BOOL FSConsoleUtils::isNearbyChatVisible() -{ - FSFloaterNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance("fs_nearby_chat", LLSD()); - return nearby_chat->getVisible(); -} - // static bool FSConsoleUtils::ProcessChatMessage(const LLChat& chat_msg, const LLSD &args) { @@ -220,11 +212,9 @@ void FSConsoleUtils::onProccessInstantMessageNameLookup(const LLUUID& agent_id, std::string senderName; std::string message(message_str); std::string delimiter = ": "; - std::string prefix = message.substr(0, 4); - LLStringUtil::toLower(prefix); // irc styled messages - if (prefix == "/me " || prefix == "/me'") + if (is_irc_me_prefix(message)) { delimiter = LLStringUtil::null; message = message.substr(3); diff --git a/indra/newview/fsconsoleutils.h b/indra/newview/fsconsoleutils.h index 80e1fd0a61..612abf74a4 100644 --- a/indra/newview/fsconsoleutils.h +++ b/indra/newview/fsconsoleutils.h @@ -34,12 +34,10 @@ class LLChat; class FSConsoleUtils { public: - static bool ProcessChatMessage(const LLChat& chat_msg, const LLSD &args); static bool ProcessInstantMessage(const LLUUID& session_id, const LLUUID& from_id, const std::string& message); protected: - static BOOL isNearbyChatVisible(); static void onProcessChatAvatarNameLookup(const LLUUID& agent_id, const LLAvatarName& av_name, const LLChat& chat_msg); static void onProccessInstantMessageNameLookup(const LLUUID& agent_id, const LLAvatarName& av_name, const std::string& message_str, const std::string& group, const LLUUID& session_id);