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 1: | Line 1: | ||
{{mirc title|/echo Command}} | {{mirc title|/echo Command}} | ||
− | The '''/echo''' | + | The '''/echo command''' prints text to the specified window. This command does not send anything to the server; text is only shown in the window. |
+ | |||
+ | '''Note:''' If you use /echo to send text to a custom listbox window which has been opened by {{mIRC|/window|/window -s}}, the line will be added added at the bottom of the window rather than being inserted in the correct sort position. | ||
+ | |||
== Synopsis == | == Synopsis == | ||
− | /echo [colour-number] [- | + | /echo [colour-number] [-deghiNtsaqlbfnmr] [window] <text> |
− | /echo -c[ | + | /echo -c[deghiNtsaqlbfnmr] <colour-name> [window] <text> |
== Switches == | == Switches == | ||
− | + | * '''-c''' - Indicates the <color_name> parameter was provided. | |
+ | * '''-e''' - Encloses the text with a pair of line separators | ||
+ | * '''-g''' - Prevents the text from being logged. | ||
+ | * '''-h''' - Applies a hard-wrap on the text. | ||
+ | * '''-i<N>''' - Wraps the text by <N> characters. | ||
+ | * '''-t''' - Adds a timestamp to the text if the timestamp is enabled (global or for that window) | ||
* '''-s''' - prints to the status window | * '''-s''' - prints to the status window | ||
* '''-a''' - prints to the active window | * '''-a''' - prints to the active window | ||
* '''-d''' - prints to the single message window | * '''-d''' - prints to the single message window | ||
− | + | * '''-q''' - Honors the $show flag. (If the alias was called with the . prefix) | |
+ | * '''-n''' - Prevents switchbar button/treebar colour change | ||
+ | * '''-m''' - Changes switchbar button/treebar colour to "messages" (as defined in mIRC Options / Display); without -m or -n it uses the colour defined for "events". | ||
=== Settings Related: === | === Settings Related: === | ||
* '''-r''' - Applies the strip settings to the text (as defined in mIRC Options / IRC / Messages). | * '''-r''' - Applies the strip settings to the text (as defined in mIRC Options / IRC / Messages). | ||
* '''-l''' - Applies the highlight settings to the text (as defined in mIRC Address Book / Highlight). | * '''-l''' - Applies the highlight settings to the text (as defined in mIRC Address Book / Highlight). | ||
− | * '''-b''' - Applies the | + | * '''-b''' - Applies the beep settings to the window (as defined in mIRC Options / Sounds). |
− | * '''-f''' - Applies the flash settings to the window ( | + | * '''-f''' - Applies the flash settings to the window (as defined in mIRC Options / IRC / Options). |
− | === | + | == Parameters == |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | * '''[colour-number]''' - A numeric colour value (0 to 15) | |
− | * '''[colour-number]''' - A numeric colour value (0 to | + | * '''<colour-name>''' - Used with the -c switch. One of the following: action, ctcp, highlight, info, info2, invite, join, part, quit, kick, mode, topic, nick, normal, notice, notify, other, own, wallops, whois |
− | * '''<colour-name>''' - | + | * '''[window]''' - The target window/channel/query |
− | * '''[window]''' - The target | ||
* '''<text>''' - The text to be printed | * '''<text>''' - The text to be printed | ||
− | + | ||
== Examples == | == Examples == | ||
− | + | A Hello World example: | |
<syntaxhighlight lang="mIRC">/echo -a Hello World!</syntaxhighlight> | <syntaxhighlight lang="mIRC">/echo -a Hello World!</syntaxhighlight> | ||
− | + | A simple example of a loop that prints a few lines: | |
<syntaxhighlight lang="mIRC">alias example { | <syntaxhighlight lang="mIRC">alias example { | ||
var %x = 5 | var %x = 5 | ||
Line 56: | Line 56: | ||
This is example line 1.</pre> | This is example line 1.</pre> | ||
− | + | ||
<syntaxhighlight lang="mIRC"> | <syntaxhighlight lang="mIRC"> | ||
− | + | echo -t #test This line begins with timestamp ONLY if timestamping is enabled within #test | |
− | echo -t #test This line | + | echo #test $timestamp This line begins with timestamp always - regardless whether timestamp is enabled or disabled in #test |
− | echo #test $timestamp This line always | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
<syntaxhighlight lang="mIRC"> | <syntaxhighlight lang="mIRC"> | ||
; See mirc-options/display | ; See mirc-options/display | ||
− | ; The 1st line causes the switchbar | + | ; The 1st line causes the echo to color the switchbar using the color for "event" because the echo is made within an EVENT |
− | ; The 2nd line -m causes the switchbar | + | ; The 2nd line -m causes the echo to color the switchbar using the color for "messages", overriding the default EVENT color |
− | ; The | + | ; The 2nd line -n causes the echo to not change the switchbar color. |
− | ; Note that Chanserv giving the joined nick OP level is a separate event, and mIRC will change the -m override, and that event will | + | ; 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 $ | + | echo $color(join) # $timestamp * $nick $+($chr(40),$gettok($fulladdress,2-,33),$chr(41)) has joined # $comchan($nick,0) |
− | echo $ | + | echo $color(join) -m # $timestamp * $nick $+($chr(40),$gettok($fulladdress,2-,33),$chr(41)) has joined # $comchan($nick,0) |
− | echo $ | + | echo $color(join) -n # $timestamp * $nick $+($chr(40),$gettok($fulladdress,2-,33),$chr(41)) has joined # $comchan($nick,0) |
haltdef | haltdef | ||
} | } | ||
Line 87: | Line 79: | ||
<syntaxhighlight lang="mIRC"> | <syntaxhighlight lang="mIRC"> | ||
− | / | + | //echo 4 abc $chr(22) def $chr(15) this text appears as color four and the color number is not logged at the beginning of the line |
− | /echo | + | //echo $chr(3) $+ 04 $+ abc $chr(22) def $chr(15) this text appears as color for normal text $color(normal) and the color code is logged at the beginning of the line |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | // | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 116: | Line 89: | ||
* [[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|$N}} | * {{mIRC|$N}} | ||
* {{mIRC|/aline}} | * {{mIRC|/aline}} |