| 1 |
! $eterna: commands,v 1.8 2018/06/10 02:25:30 mrg Exp $ |
| 2 |
! |
| 3 |
! Copyright (c) 1990-2018 Michael Sandrof, Troy Rollo, Matthew Green, |
| 4 |
! and other ircII contributors. |
| 5 |
! |
| 6 |
! All rights reserved. See the HELP IRCII COPYRIGHT file for more |
| 7 |
! information. |
| 8 |
! |
| 9 |
All IRCII commands typed on the command line must begin with one |
| 10 |
of the CMDCHARS settings (see SET CMDCHARS). By default, this |
| 11 |
is set to /. Thus, any input line whose first character is a |
| 12 |
/ is treated as an IRCII command. For example: |
| 13 |
|
| 14 |
/MSG BigCheese Howdy! |
| 15 |
|
| 16 |
This executes the MSG command, which sends a private message to |
| 17 |
"BigCheese", and that message is "Howdy!" |
| 18 |
|
| 19 |
You can create aliases for commands or redefine what an existing |
| 20 |
command does. This is done with the ALIAS command. For example: |
| 21 |
|
| 22 |
/ALIAS M /MSG |
| 23 |
|
| 24 |
NOTE: Commands within aliases and other functions do not need the |
| 25 |
SET CMDCHARS, and thus the above alias could be written as |
| 26 |
/ALIAS M MSG as well. |
| 27 |
The exception to this, is the // convention mentioned below. |
| 28 |
|
| 29 |
This example creates a new command, M, which does the same thing |
| 30 |
as MSG, you can now do: |
| 31 |
|
| 32 |
/M BigCheese Howdy! |
| 33 |
|
| 34 |
and it will work exactly like MSG. Suppose however you did this: |
| 35 |
|
| 36 |
/ALIAS MSG //MSG BigCheese |
| 37 |
|
| 38 |
Now, the MSG command will only send messages to BigCheese: |
| 39 |
|
| 40 |
/MSG Howdy! |
| 41 |
|
| 42 |
Note that in the alias, there are two / in front of MSG. Putting |
| 43 |
two of the CMDCHARS in front of a command tells IRCII that you |
| 44 |
want to use the original command, and not any alias of it. |
| 45 |
Therefore, even if you had the above alias for MSG, you could |
| 46 |
still do the following: |
| 47 |
|
| 48 |
//MSG Cheese I can still use the original MSG command. |
| 49 |
|
| 50 |
Furthermore, if you wish you can turn off your display |
| 51 |
(See SET DISPLAY) for the duration of a command. This is |
| 52 |
done by putting a ^ character between the / and the command |
| 53 |
word. For example, if you do: |
| 54 |
|
| 55 |
/^MSG BigCheese Hello |
| 56 |
|
| 57 |
You will not see any visible effect to this command (unless the |
| 58 |
nickname BigCheese does not currently exist). |
| 59 |
|
| 60 |
Lastly, if you do the following: |
| 61 |
|
| 62 |
/ /this is a test |
| 63 |
|
| 64 |
Note there is a space after the /. This form forces the following |
| 65 |
text to be sent to your current channel no matter what. You can |
| 66 |
thus send lines that begin with your CMDCHARS. It can also |
| 67 |
be used to force a message to your current channel when you are |
| 68 |
using QUERY. |