Add argument passing for C# scripts

script files with spaces in filename will need double quotes when
calling them eg /script "my script.txt" instead of /script my script.txt
This commit is contained in:
ORelio 2015-06-25 12:12:59 +02:00
parent e29b4ee545
commit f076e1f512
3 changed files with 61 additions and 10 deletions

View file

@ -95,7 +95,7 @@ namespace MinecraftClient.ChatBots
if (current_task != null)
{
//Check if we built a valid task before adding it
if (current_task.script_file != null && Script.lookForScript(ref current_task.script_file) //Check if file exists
if (current_task.script_file != null && Script.LookForScript(ref current_task.script_file) //Check if file exists
&& (current_task.triggerOnLogin
|| (current_task.triggerOnTime && current_task.triggerOnTime_Times.Count > 0))
|| (current_task.triggerOnInterval && current_task.triggerOnInterval_Interval > 0)) //Look for a valid trigger