Small cleanup in FSConsoleUtils

master
Ansariel 2015-11-19 17:02:06 +01:00
parent 0b9571f977
commit 28d861d982
2 changed files with 2 additions and 14 deletions

View File

@ -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<FSFloaterNearbyChat>("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);

View File

@ -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);