minor refractor

This commit is contained in:
Liam Stanley 2017-07-12 01:06:20 -04:00
parent 9e08ab340d
commit 35c5ed5946
3 changed files with 5 additions and 5 deletions

@ -9,7 +9,7 @@ before_install:
script: script:
- $HOME/gopath/bin/goveralls -service=travis-ci - $HOME/gopath/bin/goveralls -service=travis-ci
- $HOME/gopath/bin/golint -min_confidence 0.9 -set_exit_status - $HOME/gopath/bin/golint -min_confidence 0.9 -set_exit_status
- go test -v -race -timeout 3m -count 3 - GORACE="exitcode=1 halt_on_error=1" go test -v -race -timeout 3m -count 3
- go tool vet -v -all . - go tool vet -v -all .
branches: branches:
only: only:

@ -41,7 +41,7 @@ func decodeCTCP(e *Event) *CTCPEvent {
return nil return nil
} }
if (e.Command != "PRIVMSG" && e.Command != "NOTICE") || !IsValidNick(e.Params[0]) { if (e.Command != PRIVMSG && e.Command != NOTICE) || !IsValidNick(e.Params[0]) {
return nil return nil
} }
@ -67,7 +67,7 @@ func decodeCTCP(e *Event) *CTCPEvent {
Origin: e, Origin: e,
Source: e.Source, Source: e.Source,
Command: text, Command: text,
Reply: e.Command == "NOTICE", Reply: e.Command == NOTICE,
} }
} }
@ -84,7 +84,7 @@ func decodeCTCP(e *Event) *CTCPEvent {
Source: e.Source, Source: e.Source,
Command: text[0:s], Command: text[0:s],
Text: text[s+1:], Text: text[s+1:],
Reply: e.Command == "NOTICE", Reply: e.Command == NOTICE,
} }
} }

@ -51,7 +51,7 @@ func ParseEvent(raw string) (e *Event) {
return nil return nil
} }
i, j := 0, 0 var i, j int
e = &Event{} e = &Event{}
if raw[0] == prefixTag { if raw[0] == prefixTag {