[RAD-428] Gestures not parsing chat channels correctly

This commit is contained in:
nooperation
2015-07-21 22:37:19 -04:00
parent 3421f412a1
commit 8a6b8a711b

View File

@@ -2571,7 +2571,19 @@ namespace OpenMetaverse
switch (step.GestureStepType)
{
case GestureStepType.Chat:
Chat(((GestureStepChat)step).Text, 0, ChatType.Normal);
string text = ((GestureStepChat)step).Text;
int channel = 0;
Match m;
if ((m = Regex.Match(text, @"^/(?<channel>-?[0-9]+)\s*(?<text>.*)", RegexOptions.CultureInvariant)).Success)
{
if (int.TryParse(m.Groups["channel"].Value, out channel))
{
text = m.Groups["text"].Value;
}
}
Chat(text, channel, ChatType.Normal);
break;
case GestureStepType.Animation: