hid: ircSendToRoommates -> ircNotifyRoommates

Should be clearer.
This commit is contained in:
Přemysl Eric Janouch 2018-08-01 19:35:47 +02:00
parent e0b46a8cff
commit a966d8489a
Signed by: p
GPG Key ID: A0420B94F92B9493

View File

@ -828,8 +828,7 @@ func ircChannelDestroyIfEmpty(ch *channel) {
} }
} }
// TODO: Improve the name as it takes mode +q into account. func ircNotifyRoommates(c *client, message string) {
func ircSendToRoommates(c *client, message string) {
targets := make(map[*client]bool) targets := make(map[*client]bool)
for _, ch := range channels { for _, ch := range channels {
_, present := ch.userModes[c] _, present := ch.userModes[c]
@ -929,7 +928,7 @@ func (c *client) unregister(reason string) {
return return
} }
ircSendToRoommates(c, fmt.Sprintf(":%s!%s@%s QUIT :%s", ircNotifyRoommates(c, fmt.Sprintf(":%s!%s@%s QUIT :%s",
c.nickname, c.username, c.hostname, reason)) c.nickname, c.username, c.hostname, reason))
// The eventual QUIT message will take care of state at clients. // The eventual QUIT message will take care of state at clients.
@ -1379,7 +1378,7 @@ func ircHandleNICK(msg *message, c *client) {
message := fmt.Sprintf(":%s!%s@%s NICK :%s", message := fmt.Sprintf(":%s!%s@%s NICK :%s",
c.nickname, c.username, c.hostname, nickname) c.nickname, c.username, c.hostname, nickname)
ircSendToRoommates(c, message) ircNotifyRoommates(c, message)
c.send(message) c.send(message)
} }