Implemented topic lock

This commit is contained in:
Harry Jeffery 2013-08-29 18:05:25 +01:00
parent 624c6f3ed7
commit 85fb96dbb4

View File

@ -211,6 +211,12 @@ func (s *Server) handleEvent(e Event) {
return return
} }
clientMode := channel.modeMap[strings.ToLower(e.client.nick)]
if channel.mode.topicLocked && !clientMode.operator {
e.client.reply(errNoPriv)
return
}
if args[1] == ":" { if args[1] == ":" {
channel.topic = "" channel.topic = ""
for _, client := range channel.clientMap { for _, client := range channel.clientMap {