From WikiChip
Editing mirc/commands/echo

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 3: Line 3:
  
 
== Synopsis ==
 
== Synopsis ==
  /echo [colour-number] [-deghi[N]tsaqlbfnmr] [window] <text>
+
  /echo [color-number] [-deghi[N]tsaqlbfnmr] [window] <text>
  /echo -c[deghi[N]tsaqlbfnmr] <colour-name> [window] <text>
+
  /echo -c[deghi[N]tsaqlbfnmr] <color-name> [window] <text>
  
 
== Switches ==
 
== Switches ==
Line 19: Line 19:
  
 
=== Other switches ===
 
=== Other switches ===
* '''-c''' - Indicates that the <colour-name> parameter is provided as the 1st parameter following the switch(es).
+
* '''-c''' - Indicates that the <color-name> parameter is provided as the 1st parameter following the switch(es).
 
* '''-e''' - Encloses the text with a pair of lines containing the line separator. Note: does not add a leading line if it already consists entirely of the line separator.
 
* '''-e''' - Encloses the text with a pair of lines containing the line separator. Note: does not add a leading line if it already consists entirely of the line separator.
 
* '''-g''' - Prevents the text from being logged if the window has logging on.
 
* '''-g''' - Prevents the text from being logged if the window has logging on.
Line 26: Line 26:
 
* '''-t''' - Adds a timestamp to the text if the timestamp is enabled for that window. Without this, the line will not be timestamped even if the window has timestamping set. Note: -t shows timestamp in Custom Windows even though they do not have a timestamp setting, but only if timestamping has been enabled in mirc-options/irc/messages/"timestamp events".
 
* '''-t''' - Adds a timestamp to the text if the timestamp is enabled for that window. Without this, the line will not be timestamped even if the window has timestamping set. Note: -t shows timestamp in Custom Windows even though they do not have a timestamp setting, but only if timestamping has been enabled in mirc-options/irc/messages/"timestamp events".
 
* '''-q''' - Honors the $show flag. (Displays nothing if the alias was called with the . prefix)
 
* '''-q''' - Honors the $show flag. (Displays nothing if the alias was called with the . prefix)
* '''-n''' - Prevents switchbar button/treebar colour change
+
* '''-n''' - Prevents switchbar button/treebar color change
* '''-m''' - Treats the line as an user message, colours the window button in the switchbar/treebar with the "Message" colour defined in the option  alt+o>Display.
+
* '''-m''' - Treats the line as an user message, colors the window button in the switchbar/treebar with the "Message" color defined in the option  alt+o>Display.
  
 
== Parameters ==
 
== Parameters ==
* '''[colour-number]''' - A numeric colour value (0 to 99) Note: 99 is $colour(listbox text) instead of $colour(normal) even in #channel and Status window where background is $colour(background). If $colour(listbox text) is the same index as $colour(background), 99 tries $colour(normal) then $colour(gray) searching for a colour that doesn't match the background colour.
+
* '''[color-number]''' - A numeric color value (0 to 99) Note: 99 is $color(listbox text) instead of $color(normal) even in #channel and Status window where background is $color(background). If $color(listbox text) is the same index as $color(background), 99 tries $color(normal) then $color(gray) searching for a color that doesn't match the background color.
* '''<colour-name>''' - When the -c switch is used, the next parameter must be one of the following: action, ctcp, highlight, info, info2, invite, join, kick, mode, nick, normal, notice, notify, other, own, part, quit, topic, wallops, whois, "listbox text", gray, listbox, "treebar text", treebar Note: Quotes are needed for items which are 2 words. Note: If colour for that name matches $colour(background) it is displayed as $colour(normal) until the colour index for background is changed. Note: If colour name not in the list of recognized names, defaults to 'normal'. Note: If you later change the colour index for a colour name, the echoed lines change to that colour.
+
* '''<color-name>''' - When the -c switch is used, the next parameter must be one of the following: action, ctcp, highlight, info, info2, invite, join, kick, mode, nick, normal, notice, notify, other, own, part, quit, topic, wallops, whois, "listbox text", gray, listbox, "treebar text", treebar Note: Quotes are needed for items which are 2 words. Note: If color for that name matches $color(background) it is displayed as $color(normal) until the color index for background is changed. Note: If color name not in the list of recognized names, defaults to 'normal'. Note: If you later change the color index for a color name, the echoed lines change to that color.
 
* '''[window]''' - The target @window/#channel/query '''Note:''' If you use /echo to send text to a custom @window which has been opened by {{mIRC|/window|/window -s}}, the line will be added at the bottom of the window rather than being inserted in the correct sort position. '''Note:''' If target is a listbox @window created using the -l switch, the output echoes to the Status Window instead.
 
* '''[window]''' - The target @window/#channel/query '''Note:''' If you use /echo to send text to a custom @window which has been opened by {{mIRC|/window|/window -s}}, the line will be added at the bottom of the window rather than being inserted in the correct sort position. '''Note:''' If target is a listbox @window created using the -l switch, the output echoes to the Status Window instead.
 
* '''<text>''' - The text to be printed
 
* '''<text>''' - The text to be printed
Line 63: Line 63:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
=== Example 4: Colours ===
+
=== Example 4: Colors ===
 
<syntaxhighlight lang="mIRC">
 
<syntaxhighlight lang="mIRC">
//echo 4 -at                abc $chr(22) def $chr(15) The timestamp and this text following the Ctrl-O revert to colour 4 (red)
+
//echo 4 -at                abc $chr(22) def $chr(15) The timestamp and this text following the Ctrl-O revert to color 4 (red)
//echo -act ctcp            abc $chr(22) def $chr(15) The timestamp and this text following the Ctrl-O revert to "ctcp" colour ( $+ $colour(ctcp) $+ )
+
//echo -act ctcp            abc $chr(22) def $chr(15) The timestamp and this text following the Ctrl-O revert to "ctcp" color ( $+ $color(ctcp) $+ )
//echo -at $chr(3) $+ 04 $+ abc $chr(22) def $chr(15) The timestamp and this text appear as "normal" colour ( $+ $colour(normal) $+ )  
+
//echo -at $chr(3) $+ 04 $+ abc $chr(22) def $chr(15) The timestamp and this text appear as "normal" color ( $+ $color(normal) $+ )  
 
</syntaxhighlight>
 
</syntaxhighlight>
  
=== Example 5: Switchbar/treebar colours ===
+
=== Example 5: Switchbar/treebar colors ===
 
<syntaxhighlight lang="mIRC">
 
<syntaxhighlight lang="mIRC">
 
; See mirc-options/display
 
; See mirc-options/display
; The 1st line    causes the switchbar to change to the "event" colour.
+
; The 1st line    causes the switchbar to change to the "event" color.
; The 2nd line -m causes the switchbar to change to the "messages" colour, overriding the default EVENT colour.
+
; The 2nd line -m causes the switchbar to change to the "messages" color, overriding the default EVENT color.
; The 3rd line -n leaves the switchbar colour unchanged.
+
; The 3rd line -n leaves the switchbar color unchanged.
; Note that Chanserv giving the joined nick OP level is a separate event, and mIRC will change the -m override, and that event will colour the switchbar as the EVENT colour.
+
; Note that Chanserv giving the joined nick OP level is a separate event, and mIRC will change the -m override, and that event will color the switchbar as the EVENT color.
  
 
on ^*:JOIN:#:{
 
on ^*:JOIN:#:{
   echo $colour(join) -t  # * $nick $+($chr(40),$gettok($fulladdress,2-,33),$chr(41)) has joined # $comchan($nick,0)
+
   echo $color(join) -t  # * $nick $+($chr(40),$gettok($fulladdress,2-,33),$chr(41)) has joined # $comchan($nick,0)
   echo $colour(join) -tm # * $nick $+($chr(40),$gettok($fulladdress,2-,33),$chr(41)) has joined # $comchan($nick,0)
+
   echo $color(join) -tm # * $nick $+($chr(40),$gettok($fulladdress,2-,33),$chr(41)) has joined # $comchan($nick,0)
   echo $colour(join) -tn # * $nick $+($chr(40),$gettok($fulladdress,2-,33),$chr(41)) has joined # $comchan($nick,0)
+
   echo $color(join) -tn # * $nick $+($chr(40),$gettok($fulladdress,2-,33),$chr(41)) has joined # $comchan($nick,0)
 
   haltdef
 
   haltdef
 
}
 
}
Line 116: Line 116:
 
* [[List of commands - mIRC|List of commands]]
 
* [[List of commands - mIRC|List of commands]]
 
* [[List of identifiers - mIRC|List of identifiers]]
 
* [[List of identifiers - mIRC|List of identifiers]]
* {{mIRC|$colour}}
 
* {{mIRC|$color}}
 
 
* {{mIRC|$N}}
 
* {{mIRC|$N}}
 
* {{mIRC|/aline}}
 
* {{mIRC|/aline}}

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)