mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-22 20:09:41 +01:00
review fix: report unfolded nicks in /monitor l
when possible
This commit is contained in:
parent
3877db2391
commit
84c1533b53
@ -208,7 +208,17 @@ func monitorClearHandler(server *Server, client *Client, msg ircmsg.IrcMessage)
|
||||
func monitorListHandler(server *Server, client *Client, msg ircmsg.IrcMessage) bool {
|
||||
monitorList := server.monitorManager.List(client)
|
||||
|
||||
for _, line := range argsToStrings(maxLastArgLength, monitorList, ",") {
|
||||
var nickList []string
|
||||
for _, cfnick := range(monitorList) {
|
||||
replynick := cfnick
|
||||
// report the uncasefolded nick if it's available, i.e., the client is online
|
||||
if mclient := server.clients.Get(cfnick); mclient != nil {
|
||||
replynick = mclient.getNick()
|
||||
}
|
||||
nickList = append(nickList, replynick)
|
||||
}
|
||||
|
||||
for _, line := range argsToStrings(maxLastArgLength, nickList, ",") {
|
||||
client.Send(nil, server.name, RPL_MONLIST, client.getNick(), line)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user