+ def replacetopic(m, channel, num, txt)
+ return if !@bot.auth.allow?("topic", m.source, m.replyto)
+ sep = getsep(channel)
+ topic = @bot.channels[channel].topic.to_s
+ topicarray = topic.split(/\s+#{Regexp.escape(sep)}\s*/)
+ topicarray[num] = txt
+ newtopic = topicarray.join(" #{sep} ")
+ @bot.topic channel, newtopic
+ end
+