From WikiChip
Difference between revisions of "mirc/on events/on topic"
< mirc‎ | on events

m (Bot: Fixing compatibility)
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 +
{{mirc title|On Topic - Events}}
 
The '''ON TOPIC''' event triggers in a channel when the topic is changed.
 
The '''ON TOPIC''' event triggers in a channel when the topic is changed.
  
Line 16: Line 17:
 
Send an action to a channel when the topic is changed:
 
Send an action to a channel when the topic is changed:
 
<source lang="mIRC">ON *:TOPIC:#:action $chan approves of this new topic!</source>
 
<source lang="mIRC">ON *:TOPIC:#:action $chan approves of this new topic!</source>
 +
 +
<source lang="mIRC">ON *:TOPIC:#:action $chan approves of this new topic!
 +
echo 4 $chan topic for # set by $nick to ' $+ $eventparms $+ '
 +
</source>
 +
Note: # and $chan are interchangeable. $parms or $eventparms preserve leading/trailing/consecutive spaces. Otherwise can use $1-
  
 
== Compatibility ==
 
== Compatibility ==
 
{{mIRC compatibility|5.7}}
 
{{mIRC compatibility|5.7}}
 
 
== See Also ==
 
== See Also ==
* [[On ban - mIRC|ON BAN]]
+
* {{mIRC|local_identifiers}}
* [[On deop - mIRC|ON DEOP]]
+
* {{mIRC|access_levels#Event_prefixes}}
* [[On join - mIRC|ON JOIN]]
+
* {{mIRC|On events}}
* [[On mode - mIRC|ON MODE]]
 
* [[On op - mIRC|ON OP]]
 
* [[On part - mIRC|ON PART]]
 
* [[On text - mIRC|ON TEXT]]
 
* [[On unban - mIRC|ON UNBAN]]
 
{{mIRC on event list}}
 
 
 
[[Category:MIRC on events]]
 

Revision as of 10:55, 26 May 2019

The ON TOPIC event triggers in a channel when the topic is changed.

This event fills $1- with the new channel topic text.

Synopsis

ON <level>:TOPIC:<#[,#]>:<commands>

Parameters

<level>The level for the event to trigger.

<#[,#]>The channel, or channels to target. Leave as # to target all channels.

<commands>The commands to be performed when the event listener's criteria is met.

Example

Send an action to a channel when the topic is changed:

ON *:TOPIC:#:action $chan approves of this new topic!
ON *:TOPIC:#:action $chan approves of this new topic!
echo 4 $chan topic for # set by $nick to ' $+ $eventparms $+ '

Note: # and $chan are interchangeable. $parms or $eventparms preserve leading/trailing/consecutive spaces. Otherwise can use $1-

Compatibility

Added: mIRC v5.7
Added on: 02 Feb 2000
Note: Unless otherwise stated, this was the date of original functionality.
Further enhancements may have been made in later versions.

See Also