From WikiChip
Editing mirc/commands/signal

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

This page supports semantic in-text annotations (e.g. "[[Is specified as::World Heritage Site]]") to build structured and queryable content provided by Semantic MediaWiki. For a comprehensive description on how to use annotations or the #ask parser function, please have a look at the getting started, in-text annotation, or inline queries help pages.

Latest revision Your text
Line 18: Line 18:
 
Once you've executed this command, it will send a '''signal''' named ''mysignal'' to all scripts in your mIRC remotes. Any script files that have signal event listening for that signal will trigger, and perform whatever tasks they have been set to perform.
 
Once you've executed this command, it will send a '''signal''' named ''mysignal'' to all scripts in your mIRC remotes. Any script files that have signal event listening for that signal will trigger, and perform whatever tasks they have been set to perform.
  
<syntaxhighlight lang="mirc">ON *:SIGNAL:mysignal:echo -s rcvd: $signal : $1-</syntaxhighlight>
+
== Signal Event Listener ==
 +
<syntaxhighlight lang="mirc">ON *:SIGNAL:name:command</syntaxhighlight>
 +
''Note:'' The script that called /signal is triggered first, and then all other scripts are triggered.
 +
 
 +
=== Parameters ===
 +
<span style="display: inline-block; width: 85px;">''name''</span>A unique name given to your signal which is usually related to its purpose.
 +
 
 +
<span style="display: inline-block; width: 85px;">''command''</span>This is a command, or a set of commands, which can be executed when the signal event is triggered.
 +
 
 +
You can also specify a wildcard within the signal name. For example, review the following:
 +
<syntaxhighlight lang="mirc">ON *:SIGNAL:*nick:echo -a I just got a signal from $signal $+ !</syntaxhighlight>
 +
 
 +
The above code will listen for any signals that end in ''nick''. Let's take a look at a basic command to trigger this signal event:
 +
<syntaxhighlight lang="mirc">/signal endsIn-nick Here is some info!</syntaxhighlight>
 +
 
 +
The signal event we are listening for triggers on this command because the signal name we've given ''/signal'' ends in ''nick''. Below is the result of executing the above signal:
 +
 
 +
<pre>I just got a signal from bestSignal!</pre>
  
 
== Identifiers ==
 
== Identifiers ==

Please note that all contributions to WikiChip may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see WikiChip:Copyrights for details). Do not submit copyrighted work without permission!

Cancel | Editing help (opens in new window)