Skip to content

Commit

Permalink
Fix ogamed
Browse files Browse the repository at this point in the history
  • Loading branch information
alaingilbert committed Sep 1, 2018
1 parent 0b47c30 commit de9f696
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions cmd/ogamed/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ package main
import (
"log"
"net/http"
"github.com/alaingilbert/ogame"
"os"
"strconv"
"strings"

"github.com/alaingilbert/ogame"
"github.com/labstack/echo"
"gopkg.in/urfave/cli.v2"
)
Expand Down Expand Up @@ -40,6 +41,13 @@ func main() {
Aliases: []string{"p"},
EnvVars: []string{"OGAMED_PASSWORD"},
},
&cli.StringFlag{
Name: "language",
Usage: "Language to login on ogame",
Value: "en",
Aliases: []string{"l"},
EnvVars: []string{"OGAMED_LANGUAGE"},
},
&cli.StringFlag{
Name: "host",
Usage: "HTTP host",
Expand All @@ -63,10 +71,11 @@ func start(c *cli.Context) error {
universe := c.String("universe")
username := c.String("username")
password := c.String("password")
language := c.String("language")
host := c.String("host")
port := c.Int("port")
var err error
bot, err = ogame.New(universe, username, password)
bot, err = ogame.New(universe, username, password, language)
if err != nil {
return err
}
Expand Down

0 comments on commit de9f696

Please sign in to comment.