minor refractor
This commit is contained in:
parent
9e08ab340d
commit
35c5ed5946
@ -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:
|
||||
|
6
ctcp.go
6
ctcp.go
@ -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,
|
||||
}
|
||||
}
|
||||
|
||||
|
2
event.go
2
event.go
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user