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

View File

@ -9,7 +9,7 @@ before_install:
script:
- $HOME/gopath/bin/goveralls -service=travis-ci
- $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 .
branches:
only:

View File

@ -41,7 +41,7 @@ func decodeCTCP(e *Event) *CTCPEvent {
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
}
@ -67,7 +67,7 @@ func decodeCTCP(e *Event) *CTCPEvent {
Origin: e,
Source: e.Source,
Command: text,
Reply: e.Command == "NOTICE",
Reply: e.Command == NOTICE,
}
}
@ -84,7 +84,7 @@ func decodeCTCP(e *Event) *CTCPEvent {
Source: e.Source,
Command: text[0:s],
Text: text[s+1:],
Reply: e.Command == "NOTICE",
Reply: e.Command == NOTICE,
}
}

View File

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