summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2006-09-21 07:41:10 +0000
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2006-09-21 07:41:10 +0000
commitb76c115d43c168416820fa83abe5b4dc643e02a3 (patch)
treeffdaf75b0d7b53808f67006174994fa881e8bb21 /data
parenta72327f672f148f3ef306105c19bd5903fcd3d02 (diff)
Cleanup topic plugin. When setting the separator, only reset the topic if there weren't any changes
Diffstat (limited to 'data')
-rwxr-xr-xdata/rbot/plugins/topic.rb3
1 files changed, 1 insertions, 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]