public override void Process(CmdTrigger <C> trigger) { if (!trigger.Text.HasNext) { trigger.Reply("No file was specified."); return; } var file = trigger.Text.NextWord(); if (!Path.IsPathRooted(file)) { file = Path.Combine(m_Mgr.ExecFileDir, file); } if (File.Exists(file)) { m_Mgr.ExecFile(file, trigger); } else { trigger.Reply("File to execute does not exist: " + file); } }
public override void Process(CmdTrigger <C> trigger) { if (!trigger.Text.HasNext) { trigger.Reply("No file was specified."); } else { string str = trigger.Text.NextWord(); if (!Path.IsPathRooted(str)) { str = Path.Combine(m_Mgr.ExecFileDir, str); } if (File.Exists(str)) { m_Mgr.ExecFile(str, trigger); } else { trigger.Reply("File to execute does not exist: " + str); } } }