remove support for topic set

--HG--
branch : nmdc-ircfrontend
This commit is contained in:
. 2016-05-02 19:02:41 +12:00
parent eb597a6592
commit 42b211dc5e

View File

@ -225,31 +225,15 @@ func (s *Server) handleCommand(client *Client, command string, args []string) {
return return
} }
// Valid topic get
if len(args) == 1 { if len(args) == 1 {
client.reply(rplTopic, channel.name, channel.topic) client.reply(rplTopic, channel.name, s.name)
return return
} }
clientMode := channel.modeMap[client.key] // Disallow topic set
if channel.mode.topicLocked && !clientMode.operator { client.reply(errNoPriv)
client.reply(errNoPriv) return
return
}
if args[1] == ":" {
channel.topic = ""
for _, client := range channel.clientMap {
client.reply(rplNoTopic, channel.name)
}
} else {
topic := strings.Join(args[1:], " ")
topic = strings.TrimPrefix(topic, ":")
channel.topic = topic
for _, client := range channel.clientMap {
client.reply(rplTopic, channel.name, channel.topic)
}
}
case "LIST": case "LIST":
if client.registered == false { if client.registered == false {