diff --git a/Makefile b/Makefile index 4ac1400..699badf 100644 --- a/Makefile +++ b/Makefile @@ -6,11 +6,11 @@ SRCS = %.go all: $(BINARY) -$(BINARY): **/**/*.go **/*.go *.go +$(BINARY): deps **/**/*.go **/*.go *.go go build -ldflags "-X main.buildCommit `git describe --long --tags --dirty --always`" ./cmd/ssh-chat deps: - go get . + go get ./... build: $(BINARY) diff --git a/README.md b/README.md index 23d0f4d..c0bec30 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ Help Options: -h, --help Show this help message ``` -After doing `go get github.com/shazow/ssh-chat` on this repo, you should be able +After doing `go get github.com/shazow/ssh-chat/...` on this repo, you should be able to run a command like: ``` diff --git a/auth.go b/auth.go index e8f9192..4d27ca4 100644 --- a/auth.go +++ b/auth.go @@ -54,7 +54,7 @@ func NewAuth() *Auth { } // AllowAnonymous determines if anonymous users are permitted. -func (a Auth) AllowAnonymous() bool { +func (a *Auth) AllowAnonymous() bool { return a.whitelist.Len() == 0 } diff --git a/chat/command.go b/chat/command.go index 76e4b21..61b7073 100644 --- a/chat/command.go +++ b/chat/command.go @@ -62,7 +62,7 @@ func (c Commands) Alias(command string, alias string) error { // Run executes a command message. func (c Commands) Run(room *Room, msg message.CommandMsg) error { - if msg.From == nil { + if msg.From() == nil { return ErrNoOwner }