Skip to content

Commit

Permalink
fix allow to pass parameters to plugins in config
Browse files Browse the repository at this point in the history
  • Loading branch information
shizeeg committed Dec 27, 2014
1 parent 8a0f269 commit e8a99ab
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,12 @@ func main() {
// Run external commands (CLI)
default:
if cli, ok := plugins[CMD]; ok {
go s.RunPlugin(stanza, cli, true, parser.Tokens[2:]...)
plugin := strings.Split(cli, " ")
params := parser.Tokens[2:]
if len(plugin) > 1 {
params = append(plugin[1:], parser.Tokens[2:]...)
}
go s.RunPlugin(stanza, plugin[0], true, params...)
}

case "JOIN":
Expand Down

0 comments on commit e8a99ab

Please sign in to comment.