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