on *:TOPIC:#:{
  if ($chan(#).topic != %ctopic [ $+ [ $chan ] ]) && (%topiclock [ $+ [ $chan ] ] == on) {
    .topic # %ctopic [ $+ [ $chan ] ]
    return
  }
}
on admin:TEXT:!*:#:{
  if ($1 == !topiclock) {
    if ($2 == on) {
      set %topiclock $+ # on
      set %ctopic $+ # $chan(#).topic
      .notice # Topic Lock is ON
      return
    }
    if ($2 == off) {
      set %topiclock $+ # off
      unset %topiclock $+ # on
      unset %ctopic $+ # $chan(#).topic
      .notice $nick Topic Lock is OFF | unset %topic [ $+ [ $chan ] ]
      return
    }
    else { halt | return }
  }
}
Published in: mIRC
Download

Related snippets