From 85fb96dbb4670fd53df3dc8c9e885f2aa0bffa39 Mon Sep 17 00:00:00 2001 From: Harry Jeffery Date: Thu, 29 Aug 2013 18:05:25 +0100 Subject: [PATCH] Implemented topic lock --- server.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/server.go b/server.go index 19c36f9..ccef227 100644 --- a/server.go +++ b/server.go @@ -211,6 +211,12 @@ func (s *Server) handleEvent(e Event) { return } + clientMode := channel.modeMap[strings.ToLower(e.client.nick)] + if channel.mode.topicLocked && !clientMode.operator { + e.client.reply(errNoPriv) + return + } + if args[1] == ":" { channel.topic = "" for _, client := range channel.clientMap {