mirror of https://github.com/fluffle/goirc
Merge pull request #82 from stapelberg/patch-2
ParseLine: ignore empty lines (instead of crashing)
This commit is contained in:
commit
6eefee83e9
|
@ -115,6 +115,10 @@ func (line *Line) Public() bool {
|
||||||
func ParseLine(s string) *Line {
|
func ParseLine(s string) *Line {
|
||||||
line := &Line{Raw: s}
|
line := &Line{Raw: s}
|
||||||
|
|
||||||
|
if s == "" {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
if s[0] == '@' {
|
if s[0] == '@' {
|
||||||
var rawTags string
|
var rawTags string
|
||||||
line.Tags = make(map[string]string)
|
line.Tags = make(map[string]string)
|
||||||
|
|
Loading…
Reference in New Issue