remove support for topic set
--HG-- branch : nmdc-ircfrontend
This commit is contained in:
parent
eb597a6592
commit
42b211dc5e
22
server.go
22
server.go
@ -225,31 +225,15 @@ func (s *Server) handleCommand(client *Client, command string, args []string) {
|
||||
return
|
||||
}
|
||||
|
||||
// Valid topic get
|
||||
if len(args) == 1 {
|
||||
client.reply(rplTopic, channel.name, channel.topic)
|
||||
client.reply(rplTopic, channel.name, s.name)
|
||||
return
|
||||
}
|
||||
|
||||
clientMode := channel.modeMap[client.key]
|
||||
if channel.mode.topicLocked && !clientMode.operator {
|
||||
// Disallow topic set
|
||||
client.reply(errNoPriv)
|
||||
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":
|
||||
if client.registered == false {
|
||||
|
Loading…
Reference in New Issue
Block a user