remove support for topic set
--HG-- branch : nmdc-ircfrontend
This commit is contained in:
parent
eb597a6592
commit
42b211dc5e
26
server.go
26
server.go
@ -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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user