From b76c115d43c168416820fa83abe5b4dc643e02a3 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Thu, 21 Sep 2006 07:41:10 +0000 Subject: Cleanup topic plugin. When setting the separator, only reset the topic if there weren't any changes --- data/rbot/plugins/topic.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/data/rbot/plugins/topic.rb b/data/rbot/plugins/topic.rb index 9b6ffdb4..fa2a45db 100755 --- a/data/rbot/plugins/topic.rb +++ b/data/rbot/plugins/topic.rb @@ -121,7 +121,7 @@ class TopicPlugin < Plugin if sep != oldsep and topicarray.length > 0 newtopic = topicarray.join(" #{sep} ") - @bot.topic ch, newtopic + @bot.topic ch, newtopic if newtopic != topic end data[:separator] = sep @@ -195,7 +195,6 @@ class TopicPlugin < Plugin def restoretopic(m, channel) return if !@bot.auth.allow?("topic::store::restore", m.source, m.replyto) - return if !@bot.auth.allow?("restoretopic", m.source, m.replyto) k = channel.downcase if @registry.has_key?(k) && @registry[k].has_key?(:topic) topic = @registry[k][:topic] -- cgit v1.2.3