From WikiChip
Difference between revisions of "mirc/on events/on topic"
m (Bot: adding missing title) |
m (→Parameters: Link access levels) |
||
(One intermediate revision by one other user not shown) | |||
Line 8: | Line 8: | ||
== Parameters == | == Parameters == | ||
− | <span style="display: inline-block; width: 105px;">'''<level>'''</span>The | + | <span style="display: inline-block; width: 105px;"> '''<level>'''</span>The corresponding {{mIRC|access levels}} for the event to trigger. |
<span style="display: inline-block; width: 105px;">'''<#[,#]>'''</span>The channel, or channels to target. Leave as '''#''' to target all channels. | <span style="display: inline-block; width: 105px;">'''<#[,#]>'''</span>The channel, or channels to target. Leave as '''#''' to target all channels. | ||
Line 17: | 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 == | ||
− | * | + | * {{mIRC|local_identifiers}} |
− | * | + | * {{mIRC|access_levels#Event_prefixes}} |
− | * | + | * {{mIRC|On events}} |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Latest revision as of 07:15, 6 February 2024
Commands & Identifiers
Basics
Events
Matching Tools
Data Storage
Control Structures
GUI Scripting
Sockets
Advanced Scripting
Additional Resources
Security
Other
The ON TOPIC event triggers in a channel when the topic is changed.
This event fills $1- with the new channel topic text.
Synopsis[edit]
ON <level>:TOPIC:<#[,#]>:<commands>
Parameters[edit]
<level>The corresponding access levels 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[edit]
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[edit]
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.