Difference between revisions of "Preference:Alias"
(→How It Works: nowiki) |
m (Havondale moved page Broken/Alias to Preference:Alias without leaving a redirect) |
||
(11 intermediate revisions by 3 users not shown) | |||
Line 4: | Line 4: | ||
==How It Works== | ==How It Works== | ||
− | |||
− | + | Each alias has a Match, or trigger, and a Command, or output. | |
+ | |||
+ | === Match === | ||
+ | |||
+ | The match is what triggers the alias. A match can either be a [[command]] used on the [[command line]] or the name of a channel on a server that is triggered when joined. | ||
+ | |||
+ | Commands start with a forwardslash ( / ) followed by the name of the command. The name should not already be taken in Mibbit. | ||
Bear in mind that the first match will trigger, so if you have duplicate matches, only the first will be used. The match is also case insensitive. | Bear in mind that the first match will trigger, so if you have duplicate matches, only the first will be used. The match is also case insensitive. | ||
+ | |||
+ | Further, matches to commands already in the client such as <tt>/join</tt> will overwrite the original functionality. Don't do this unless you are trying to remove such functionality. | ||
+ | |||
+ | === OnJoin Match === | ||
+ | A match that triggers when joining a specific channel is also called an onJoin match. Currently, an onJoin alias only works on the [[main client]]. The match follows the following style: | ||
+ | |||
+ | >network>#channel | ||
+ | |||
+ | [[Category:Main client]] | ||
+ | |||
+ | === Command === | ||
+ | |||
+ | If a match triggers, the command section is implemented in the channel that triggers it. The command must be a set of commands. Certain variables and constructs for multiple commands are provided. | ||
{| border="1" cellpadding="4" style="border-collapse:collapse;padding:3px;border:1px solid #999;" | {| border="1" cellpadding="4" style="border-collapse:collapse;padding:3px;border:1px solid #999;" | ||
|+ COMMAND Variables | |+ COMMAND Variables | ||
|- | |- | ||
− | | <nowiki> | </nowiki> || (<space><nowiki>|</nowiki><space>) Separate multiple commands | + | | <nowiki> | </nowiki> || (<space><nowiki>|</nowiki><space>) Separate multiple commands (lines) |
|- | |- | ||
| # || The current channel | | # || The current channel | ||
Line 31: | Line 49: | ||
| /say || Say something on the current channel | | /say || Say something on the current channel | ||
|- | |- | ||
− | | $? || | + | | $? || Causes a prompt asking for information, password, etc. |
|} | |} | ||
Line 38: | Line 56: | ||
You can have a .,!? after $me, and you can have a # before any of the $N commands. | You can have a .,!? after $me, and you can have a # before any of the $N commands. | ||
− | + | ==Default Aliases== | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
{{DefaultAlias}} | {{DefaultAlias}} | ||
− | == | + | ==Examples== |
− | + | For examples of custom aliases, see [[Alias/Examples]]. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | [[Category:Preferences | + | [[Category:Preferences]][[Category:Support]] |
Latest revision as of 10:16, 3 May 2020
Aliases are user set commands that reference other commands so that they do not have to repeat themselves each time they want to use a specific line. As they are preferences, they can be set for widgets also.
How It Works
Each alias has a Match, or trigger, and a Command, or output.
Match
The match is what triggers the alias. A match can either be a command used on the command line or the name of a channel on a server that is triggered when joined.
Commands start with a forwardslash ( / ) followed by the name of the command. The name should not already be taken in Mibbit.
Bear in mind that the first match will trigger, so if you have duplicate matches, only the first will be used. The match is also case insensitive.
Further, matches to commands already in the client such as /join will overwrite the original functionality. Don't do this unless you are trying to remove such functionality.
OnJoin Match
A match that triggers when joining a specific channel is also called an onJoin match. Currently, an onJoin alias only works on the main client. The match follows the following style:
>network>#channel
Command
If a match triggers, the command section is implemented in the channel that triggers it. The command must be a set of commands. Certain variables and constructs for multiple commands are provided.
| | (<space>|<space>) Separate multiple commands (lines) |
# | The current channel |
$N | (Where N is a number) - replace this with the Nth word from the input |
$$N | Same as above, but if there is no such word, only ignore this command, not the whole alias |
$N- | replace with all words from N onward (i.e. $3- would take the third word and all following it) |
$N-M | replace with all words from N to M (i.e. $1-5 would take the first 5 words) |
$+ | suppress the spaces between variables and following text or other variables |
$me | Your current nickname |
/say | Say something on the current channel |
$? | Causes a prompt asking for information, password, etc. |
You can have a .,!? after $me, and you can have a # before any of the $N commands.
Default Aliases
Alias Name | Command | What It Does |
---|---|---|
/j | /join $1- | Smaller command to join channels |
/cs | /msg ChanServ $1- | Message ChanServ with only two letters. |
/ns | /msg NickServ $1- | Message NickServ with only two letters. |
/bs | /msg BotServ $1- | Message BotServ with only two letters. |
/ms | /msg MemoServ $1- | Message MemoServ with only two letters. |
/os | /msg OperServ $1- | Message OperServ with only two letters. |
/voice | /mode # +v $1 | Voice a user/nick |
/devoice | /mode # -v $1 | Remove voice from a user/nick (/unvoice is the same) |
/ban | /mode # +b $1 | Ban a user/hostmask (/ban<space> = show list with unban buttons) |
/unban | /mode # -b $1 | Remove a ban from a user/hostmask (/deban is the same) |
/op | /mode # +o $1 | Give operator status to a user/nick. |
/deop | /mode # -o $1 | Remove operator status from a user/nick (/unop is the same) |
/halfop | /mode # +h $1 | Give half-operator status to a user/nick. |
/dehalfop | /mode # -h $1 | Remove half-operator status from a user/nick (/unhalfop is the same) |
/admin | /mode # +a $1 | Give super-operator status to a user/nick (called Admin on Mibbit, use "/raw admin" for the ircd command) |
/deadmin | /mode # -a $1 | Remove super-operator status from a user/nick (/unadmin is the same) |
/owner | /mode # +q $1 | Give owner status to the user/nick |
/deowner | /mode # -q $1 | Remove owner status from the user/nick (/unowner is the same) |
Examples
For examples of custom aliases, see Alias/Examples.