From a715882a7577dbb37cf817f55ed20a29bdb005e3 Mon Sep 17 00:00:00 2001 From: Daniel Oaks Date: Thu, 14 Apr 2016 21:53:45 +1000 Subject: [PATCH] Remove RplCurrentMode NOTICE on successful MODE commands. Fixes #22 --- irc/modes.go | 1 - irc/reply.go | 15 --------------- 2 files changed, 16 deletions(-) diff --git a/irc/modes.go b/irc/modes.go index caa99b04..c8ce49c1 100644 --- a/irc/modes.go +++ b/irc/modes.go @@ -165,7 +165,6 @@ func (m *ModeCommand) HandleServer(s *Server) { } else if client == target { client.RplUModeIs(client) } - client.Reply(RplCurrentMode(client, target)) } func (msg *ChannelModeCommand) HandleServer(server *Server) { diff --git a/irc/reply.go b/irc/reply.go index 4caaa6ff..5f5562ee 100644 --- a/irc/reply.go +++ b/irc/reply.go @@ -123,21 +123,6 @@ func RplModeChanges(client *Client, target *Client, changes ModeChanges) string 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, changes ChannelModeChanges) string { return NewStringReply(client, MODE, "%s %s", channel, changes)