Just kidding, IM handling works now. For future reference - Don't make the commit data before you're going to push it - you can't change it later, apparently, or clear the commit to make a new one.
This commit is contained in:
@@ -407,10 +407,8 @@ void LLChatBar::sendChat( EChatType type )
|
|||||||
std::string utf8_revised_text;
|
std::string utf8_revised_text;
|
||||||
if (0 == channel)
|
if (0 == channel)
|
||||||
{
|
{
|
||||||
llinfos << "Checking for OOC handling" << llendl;
|
|
||||||
if (gSavedSettings.getBOOL("AscentAutoCloseOOC"))
|
if (gSavedSettings.getBOOL("AscentAutoCloseOOC"))
|
||||||
{
|
{
|
||||||
llinfos << "OOC Handling occurring" << llendl;
|
|
||||||
// Chalice - OOC autoclosing patch based on code by Henri Beauchamp
|
// Chalice - OOC autoclosing patch based on code by Henri Beauchamp
|
||||||
int needsClosingType=0;
|
int needsClosingType=0;
|
||||||
//Check if it needs the end-of-chat brackets -HgB
|
//Check if it needs the end-of-chat brackets -HgB
|
||||||
|
|||||||
@@ -2017,12 +2017,44 @@ void LLFloaterIMPanel::sendMsg()
|
|||||||
// store sent line in history, duplicates will get filtered
|
// store sent line in history, duplicates will get filtered
|
||||||
if (mInputEditor) mInputEditor->updateHistory();
|
if (mInputEditor) mInputEditor->updateHistory();
|
||||||
// Truncate and convert to UTF8 for transport
|
// Truncate and convert to UTF8 for transport
|
||||||
std::string utf8_text = wstring_to_utf8str(text);
|
std::string utf8text = wstring_to_utf8str(text);
|
||||||
utf8_text = utf8str_truncate(utf8_text, MAX_MSG_BUF_SIZE - 1);
|
if (gSavedSettings.getBOOL("AscentAutoCloseOOC"))
|
||||||
|
{
|
||||||
|
// Chalice - OOC autoclosing patch based on code by Henri Beauchamp
|
||||||
|
int needsClosingType=0;
|
||||||
|
//Check if it needs the end-of-chat brackets -HgB
|
||||||
|
if (utf8text.find("((") == 0 && utf8text.find("))") == -1)
|
||||||
|
{
|
||||||
|
if(utf8text.at(utf8text.length() - 1) == ')')
|
||||||
|
utf8text+=" ";
|
||||||
|
utf8text+="))";
|
||||||
|
}
|
||||||
|
else if(utf8text.find("[[") == 0 && utf8text.find("]]") == -1)
|
||||||
|
{
|
||||||
|
if(utf8text.at(utf8text.length() - 1) == ']')
|
||||||
|
utf8text+=" ";
|
||||||
|
utf8text+="]]";
|
||||||
|
}
|
||||||
|
//Check if it needs the start-of-chat brackets -HgB
|
||||||
|
needsClosingType=0;
|
||||||
|
if (utf8text.find("((") == -1 && utf8text.find("))") == (utf8text.length() - 2))
|
||||||
|
{
|
||||||
|
if(utf8text.at(0) == '(')
|
||||||
|
utf8text.insert(0," ");
|
||||||
|
utf8text.insert(0,"((");
|
||||||
|
}
|
||||||
|
else if (utf8text.find("[[") == -1 && utf8text.find("]]") == (utf8text.length() - 2))
|
||||||
|
{
|
||||||
|
if(utf8text.at(0) == '[')
|
||||||
|
utf8text.insert(0," ");
|
||||||
|
utf8text.insert(0,"[[");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
utf8text = utf8str_truncate(utf8text, MAX_MSG_BUF_SIZE - 1);
|
||||||
|
|
||||||
if ( mSessionInitialized )
|
if ( mSessionInitialized )
|
||||||
{
|
{
|
||||||
deliver_message(utf8_text,
|
deliver_message(utf8text,
|
||||||
mSessionUUID,
|
mSessionUUID,
|
||||||
mOtherParticipantUUID,
|
mOtherParticipantUUID,
|
||||||
mDialog);
|
mDialog);
|
||||||
@@ -2035,16 +2067,16 @@ void LLFloaterIMPanel::sendMsg()
|
|||||||
gAgent.buildFullname(history_echo);
|
gAgent.buildFullname(history_echo);
|
||||||
|
|
||||||
// Look for IRC-style emotes here.
|
// Look for IRC-style emotes here.
|
||||||
std::string prefix = utf8_text.substr(0, 4);
|
std::string prefix = utf8text.substr(0, 4);
|
||||||
if (prefix == "/me " || prefix == "/me'")
|
if (prefix == "/me " || prefix == "/me'")
|
||||||
{
|
{
|
||||||
utf8_text.replace(0,3,"");
|
utf8text.replace(0,3,"");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
history_echo += ": ";
|
history_echo += ": ";
|
||||||
}
|
}
|
||||||
history_echo += utf8_text;
|
history_echo += utf8text;
|
||||||
|
|
||||||
BOOL other_was_typing = mOtherTyping;
|
BOOL other_was_typing = mOtherTyping;
|
||||||
|
|
||||||
@@ -2061,7 +2093,7 @@ void LLFloaterIMPanel::sendMsg()
|
|||||||
{
|
{
|
||||||
//queue up the message to send once the session is
|
//queue up the message to send once the session is
|
||||||
//initialized
|
//initialized
|
||||||
mQueuedMsgsForInit.append(utf8_text);
|
mQueuedMsgsForInit.append(utf8text);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user