[RAD-428] Gestures not parsing chat channels correctly
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user