3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-11-10 22:19:31 +01:00

modes: Convey cmode changes to other channel members...

This commit is contained in:
Daniel Oaks 2016-11-29 19:16:01 +10:00
parent 94c2a661c3
commit 9314edd405

View File

@ -553,7 +553,9 @@ func cmodeHandler(server *Server, client *Client, msg ircmsg.IrcMessage) bool {
if len(applied) > 0 {
//TODO(dan): we should change the name of String and make it return a slice here
args := append([]string{channel.name}, strings.Split(applied.String(), " ")...)
client.Send(nil, client.nickMaskString, "MODE", args...)
for member := range channel.members {
member.Send(nil, client.nickMaskString, "MODE", args...)
}
} else {
//TODO(dan): we should just make ModeString return a slice here
args := append([]string{client.nick, channel.name}, strings.Split(channel.ModeString(client), " ")...)