1
0
Fork 0
mirror of https://github.com/fluffle/goirc synced 2025-09-06 00:43:20 +00:00

Run gofmt to fix some trailing whitespace &c.

This commit is contained in:
Alex Bramley 2015-11-02 21:41:41 +00:00
parent e935d78bb7
commit 1e190eb233
5 changed files with 22 additions and 15 deletions

View file

@ -35,7 +35,7 @@ func (line *Line) Text() string {
return ""
}
// Target returns the contextual target of the line, usually the first Arg
// Target returns the contextual target of the line, usually the first Arg
// for the IRC verb. If the line was broadcast from a channel, the target
// will be that channel. If the line was sent directly by a user, the target
// will be that user.
@ -68,8 +68,9 @@ func (line *Line) Public() bool {
switch line.Cmd {
case PRIVMSG, NOTICE, ACTION:
switch line.Args[0][0] {
case '#', '&', '+', '!': return true
}
case '#', '&', '+', '!':
return true
}
case CTCP, CTCPREPLY:
// CTCP prepends the CTCP verb to line.Args, thus for the message
// :nick!user@host PRIVMSG #foo :\001BAR baz\001
@ -78,13 +79,13 @@ func (line *Line) Public() bool {
// line.Args containing: []string{"#foo", "BAR", "baz"}
// ... OR change conn.Ctcp()'s argument order to be consistent.
switch line.Args[1][0] {
case '#', '&', '+', '!': return true
}
case '#', '&', '+', '!':
return true
}
}
return false
}
// ParseLine creates a Line from an incoming message from the IRC server.
//
// It contains special casing for CTCP messages, most notably CTCP ACTION.