mirror of
https://github.com/fluffle/goirc
synced 2025-06-12 01:33:21 +00:00
Add support for servers that don't use : properly
This commit is contained in:
parent
8765d3f178
commit
14ebeac6ee
1 changed files with 5 additions and 1 deletions
|
@ -217,10 +217,14 @@ func (conn *Conn) recv() {
|
||||||
if len(args) > 1 {
|
if len(args) > 1 {
|
||||||
line.Text = args[1]
|
line.Text = args[1]
|
||||||
}
|
}
|
||||||
args = strings.Split(args[0], " ", -1)
|
args = strings.Fields(args[0])
|
||||||
line.Cmd = strings.ToUpper(args[0])
|
line.Cmd = strings.ToUpper(args[0])
|
||||||
if len(args) > 1 {
|
if len(args) > 1 {
|
||||||
line.Args = args[1:len(args)]
|
line.Args = args[1:len(args)]
|
||||||
|
// some servers (Gamesurge) don't use : properly
|
||||||
|
if line.Text == "" {
|
||||||
|
line.Text = args[1]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
conn.in <- line
|
conn.in <- line
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue