Skip to content

Commit 8f1757e

Browse files
committed
#164 Jabber - Brok parameter up for Send From List, you can now include the list name CLOSE #164
1 parent a048a71 commit 8f1757e

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

Plugins/OSAE.Jabber/Jabber.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,10 @@ public override void ProcessCommand(OSAEMethod method)
8888

8989
case "SEND FROM LIST":
9090
//Speech List here should not be hard coded, but I understand we only have 2 parameters to work with...
91-
sendMessage(Common.PatternParse(OSAEObjectPropertyManager.ObjectPropertyArrayGetRandom("Speech List", method.Parameter2)), to);
91+
string speechList = method.Parameter2.Substring(0,method.Parameter2.IndexOf(","));
92+
string listItem = method.Parameter2.Substring(method.Parameter2.IndexOf(",") + 1, method.Parameter2.Length - (method.Parameter2.IndexOf(",")+ 1));
93+
if (gDebug) Log.Debug("List = " + speechList + " Item=" + listItem);
94+
sendMessage(Common.PatternParse(OSAEObjectPropertyManager.ObjectPropertyArrayGetRandom(speechList, listItem)), to);
9295
break;
9396
}
9497
}

0 commit comments

Comments
 (0)