<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://script.quakenet.org/wiki/index.php?action=history&amp;feed=atom&amp;title=On_topic</id>
	<title>On topic - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://script.quakenet.org/wiki/index.php?action=history&amp;feed=atom&amp;title=On_topic"/>
	<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=On_topic&amp;action=history"/>
	<updated>2026-06-04T03:24:36Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=On_topic&amp;diff=4346&amp;oldid=prev</id>
		<title>Doomie at 13:01, 22 November 2005</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=On_topic&amp;diff=4346&amp;oldid=prev"/>
		<updated>2005-11-22T13:01:40Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;The on TOPIC event triggers when a user changes a channel topic.&lt;br /&gt;
 on &amp;lt;level&amp;gt;:TOPIC:&amp;lt;#[,#]&amp;gt;:&amp;lt;commands&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The $1- parameter holds the new topic.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
 on *:TOPIC:#: {&lt;br /&gt;
  [[echo]] [[$chan]] [[$nick]] just changed topic on $chan to: $1-&lt;br /&gt;
 }&lt;br /&gt;
This would echo whenever a new topic is set in a channel you are. The target is the channel where topic was changed.&lt;br /&gt;
&lt;br /&gt;
The next, more complex example, would undo every topic change of a &amp;quot;not knows&amp;quot; user. Note that you should set a standardtopic at first (by using /set %topic &amp;lt;topic&amp;gt;). You additionally need to change #yourchan to your channel (e.g. #help.script). &lt;br /&gt;
 on *:TOPIC:#yourchan: {&lt;br /&gt;
  ; if the one who has set the new topic has a userlevel lower than 2&lt;br /&gt;
  [[if]] ([[$level]]($nick) &amp;lt; 2) { &lt;br /&gt;
   ; if we have a topic saved (in %topic), we reset the topic&lt;br /&gt;
   if (%topic) { [[topic]] #help.script %topic } &lt;br /&gt;
   ; if not, we take the new topic as standard&lt;br /&gt;
   else { [[set]] %topic $1- }&lt;br /&gt;
  } &lt;br /&gt;
  ; if the level is above 2, the user is allowed to change the topic&lt;br /&gt;
  else {&lt;br /&gt;
   ; take the new topic as standard&lt;br /&gt;
   set %topic $1-&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
Note that this example is for one channel only. If you want to have it for more than one channel, you need to choose variables depeding on the channelname (e.g. %topic. [ [[DollarPlus|$+]] [ $chan ] ])&lt;br /&gt;
&lt;br /&gt;
[[Category:Events]]&lt;/div&gt;</summary>
		<author><name>Doomie</name></author>
	</entry>
</feed>