mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-14 07:59:31 +01:00
monitor: Fix target output when adding targets
This commit is contained in:
parent
d39ee2fafa
commit
04d5d2fcc2
@ -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…
Reference in New Issue
Block a user