fix name reply parsing
This commit is contained in:
parent
8ceea92416
commit
e6ff641232
9
irc.go
9
irc.go
@ -13,7 +13,7 @@ import (
|
||||
|
||||
const (
|
||||
//IrcVersion exports the current version of the irc lib
|
||||
IrcVersion = "0.1.0"
|
||||
IrcVersion = "0.1.1776"
|
||||
)
|
||||
|
||||
//Connection holds the callbacks for the client
|
||||
@ -212,10 +212,9 @@ func (c *Connection) parseMessage(line string) {
|
||||
}
|
||||
|
||||
if cmd == "353" {
|
||||
idx := strings.Index(args, "=") + 2
|
||||
s := strings.Split(args[idx:], ":")
|
||||
target := strings.TrimSpace(s[0])
|
||||
c.updateNicks(target, strings.Split(s[1], " "))
|
||||
params := strings.SplitN(args, " ", 4)
|
||||
target := strings.TrimSpace(params[2])
|
||||
c.updateNicks(target, strings.Split(params[3][1:], " "))
|
||||
}
|
||||
|
||||
if c.NumericCallback != nil {
|
||||
|
@ -8,7 +8,7 @@ import (
|
||||
)
|
||||
|
||||
func TestSimpleIrc(t *testing.T) {
|
||||
con := NewConnection("thc420.xyz:6667", "irc-go", "irc-go", nil, []string{"#freedom"})
|
||||
con := NewConnection("thc420.xyz:6667", "irc-go", "irc-go", nil, []string{"#freedom", "#test"})
|
||||
|
||||
go con.Run()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user