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 1: Line 1:
{{mirc title|/signal Command}}
+
{{mIRC menu}}
The '''/signal''' command is used to send a signal to all loaded script, if one of them has a matching {{mIRC|on signal}} event, it triggers. Signals are a simple way of triggering signal events in multiple scripts at the same time.
+
Signals are a simple way of triggering signal events in multiple scripts at the same time. Once set up to listen for the signal event, either directly or indirectly (using a '''*''' wildcard), your scripts can each perform their own duties based on the signal you've provided.
 
+
== Signal Command ==
== Synopsis ==
+
Signals have a very simple syntax:
 
<syntaxhighlight lang="mirc">/signal [-n] <name> [parameters]</syntaxhighlight>
 
<syntaxhighlight lang="mirc">/signal [-n] <name> [parameters]</syntaxhighlight>
  
== Switches ==
+
=== Flags ===
* '''-n''': This flag tells the ''/signal'' command to fire immediately instead of waiting for the end of the whole current script processing, this implies nested call to signal event and also recursion can be made, though the maximum you can get is 24 iterations. If you don't provide the -n switch, mIRC waits for the end of the whole current script processing and then triggers any matching events.
+
'''-n''': This flag tells the ''/signal'' command to fire immediately after the end of the current routine, not after the end of the whole script processing, which is the case if you don't provide -n.
  
== Parameters ==
+
=== Examples ===
* '''<name>''' - the name of a signal event
 
* '''[parameters]''' - the optional parameter passed to the signal event
 
 
 
== Examples ==
 
 
Let's check out an example of a signal command below:
 
Let's check out an example of a signal command below:
 
<syntaxhighlight lang="mirc">/signal mysignal Signal information!</syntaxhighlight>
 
<syntaxhighlight lang="mirc">/signal mysignal Signal information!</syntaxhighlight>
Line 21: Line 17:
  
 
== Identifiers ==
 
== Identifiers ==
* '''$signal''' - Returns the signal name of the signal which triggered the current event.
+
<span style="display: inline-block; width: 85px;">''$signal''</span>Returns the signal name of the signal which triggered the current event.
* '''$1-''' - Returns any optional parameters that have been passed along with the signal.
+
 
 +
<span style="display: inline-block; width: 85px;">''$1-''</span>Returns any optional parameters that have been passed along with the signal.
  
 
== Example Script ==
 
== Example Script ==

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)