mirror of
https://github.com/ergochat/ergo.git
synced 2025-01-09 19:52:57 +01:00
modes: Convey cmode changes to other channel members...
This commit is contained in:
parent
94c2a661c3
commit
9314edd405
@ -553,7 +553,9 @@ func cmodeHandler(server *Server, client *Client, msg ircmsg.IrcMessage) bool {
|
|||||||
if len(applied) > 0 {
|
if len(applied) > 0 {
|
||||||
//TODO(dan): we should change the name of String and make it return a slice here
|
//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(), " ")...)
|
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 {
|
} else {
|
||||||
//TODO(dan): we should just make ModeString return a slice here
|
//TODO(dan): we should just make ModeString return a slice here
|
||||||
args := append([]string{client.nick, channel.name}, strings.Split(channel.ModeString(client), " ")...)
|
args := append([]string{client.nick, channel.name}, strings.Split(channel.ModeString(client), " ")...)
|
||||||
|
Loading…
Reference in New Issue
Block a user