forked from External/ergo
monitor: Fix target output when adding targets
This commit is contained in:
parent
d39ee2fafa
commit
04d5d2fcc2
1 changed files with 4 additions and 4 deletions
|
|
@ -166,7 +166,7 @@ func monitorAddHandler(server *Server, client *Client, msg ircmsg.IrcMessage) bo
|
||||||
}
|
}
|
||||||
|
|
||||||
// add target
|
// add target
|
||||||
casefoldedTarget, err := CasefoldName(targets[0])
|
casefoldedTarget, err := CasefoldName(target)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
@ -180,10 +180,10 @@ func monitorAddHandler(server *Server, client *Client, msg ircmsg.IrcMessage) bo
|
||||||
}
|
}
|
||||||
|
|
||||||
// add to online / offline lists
|
// add to online / offline lists
|
||||||
if target := server.clients.Get(casefoldedTarget); target == nil {
|
if targetClient := server.clients.Get(casefoldedTarget); targetClient == nil {
|
||||||
offline = append(offline, targets[0])
|
offline = append(offline, target)
|
||||||
} else {
|
} else {
|
||||||
online = append(online, target.getNick())
|
online = append(online, targetClient.getNick())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue