Explorar el Código

review fix: report unfolded nicks in `/monitor l` when possible

tags/v0.9.2-beta
Shivaram Lingamneni hace 6 años
padre
commit
84c1533b53
Se han modificado 1 ficheros con 11 adiciones y 1 borrados
  1. 11
    1
      irc/monitor.go

+ 11
- 1
irc/monitor.go Ver fichero

@@ -208,7 +208,17 @@ func monitorClearHandler(server *Server, client *Client, msg ircmsg.IrcMessage)
208 208
 func monitorListHandler(server *Server, client *Client, msg ircmsg.IrcMessage) bool {
209 209
 	monitorList := server.monitorManager.List(client)
210 210
 
211
-	for _, line := range argsToStrings(maxLastArgLength, monitorList, ",") {
211
+	var nickList []string
212
+	for _, cfnick := range(monitorList) {
213
+		replynick := cfnick
214
+		// report the uncasefolded nick if it's available, i.e., the client is online
215
+		if mclient := server.clients.Get(cfnick); mclient != nil {
216
+			replynick = mclient.getNick()
217
+		}
218
+		nickList = append(nickList, replynick)
219
+	}
220
+
221
+	for _, line := range argsToStrings(maxLastArgLength, nickList, ",") {
212 222
 		client.Send(nil, server.name, RPL_MONLIST, client.getNick(), line)
213 223
 	}
214 224
 

Loading…
Cancelar
Guardar