3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-11-26 13:59:44 +01:00

Remove RplCurrentMode NOTICE on successful MODE commands. Fixes #22

This commit is contained in:
Daniel Oaks 2016-04-14 21:53:45 +10:00
parent d65a855c41
commit a715882a75
2 changed files with 0 additions and 16 deletions

View File

@ -165,7 +165,6 @@ func (m *ModeCommand) HandleServer(s *Server) {
} else if client == target { } else if client == target {
client.RplUModeIs(client) client.RplUModeIs(client)
} }
client.Reply(RplCurrentMode(client, target))
} }
func (msg *ChannelModeCommand) HandleServer(server *Server) { func (msg *ChannelModeCommand) HandleServer(server *Server) {

View File

@ -123,21 +123,6 @@ func RplModeChanges(client *Client, target *Client, changes ModeChanges) string
return NewStringReply(client, MODE, "%s :%s", target.Nick(), changes) return NewStringReply(client, MODE, "%s :%s", target.Nick(), changes)
} }
func RplCurrentMode(client *Client, target *Client) string {
globalFlags := "global:"
for mode, _ := range target.flags {
globalFlags += mode.String()
}
perChannelFlags := ""
for channel, _ := range target.channels {
perChannelFlags += fmt.Sprintf(" %s:%s", channel.name, channel.members[target])
}
response := NewText(fmt.Sprintf("user %s has %s%s", target.nick, globalFlags, perChannelFlags))
return RplNotice(client.server, client, response)
}
func RplChannelMode(client *Client, channel *Channel, func RplChannelMode(client *Client, channel *Channel,
changes ChannelModeChanges) string { changes ChannelModeChanges) string {
return NewStringReply(client, MODE, "%s %s", channel, changes) return NewStringReply(client, MODE, "%s %s", channel, changes)