1
0
Fork 0
forked from External/ergo

get rid of extra topic messages

This commit is contained in:
Jeremy Latt 2014-02-15 19:56:38 -08:00
parent 488b2ccf8f
commit ae02596214

View file

@ -242,20 +242,18 @@ func (m *TopicCommand) HandleChannel(channel *Channel) {
return return
} }
if m.setTopic { if !m.setTopic {
if channel.flags[OpOnlyTopic] {
client.Reply(ErrChanOPrivIsNeeded(channel))
return
}
channel.topic = m.topic
channel.GetTopic(client) channel.GetTopic(client)
channel.Reply(RplTopicMsg(client, channel))
return return
} }
channel.GetTopic(client) if channel.flags[OpOnlyTopic] {
return client.Reply(ErrChanOPrivIsNeeded(channel))
return
}
channel.topic = m.topic
channel.Reply(RplTopicMsg(client, channel))
} }
func (m *PrivMsgCommand) HandleChannel(channel *Channel) { func (m *PrivMsgCommand) HandleChannel(channel *Channel) {