Difference between revisions of "Template:Command/doc"

From Mibbit Wiki
Jump to: navigation, search
m
m (Updated.)
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
{| ! border = 1
 +
|+ Parameters
 +
|-
 +
! Name !! Description
 +
|-
 +
| name || Name of command, without the beginning slash.
 +
|-
 +
| parameters || Parameters of the command.
 +
|-
 +
| desc || Description of the command.  Optional.  Only one line if it doesn't exist, good for [[:Category:Commands]]
 +
|-
 +
| disabled || Sometimes commands are disabled for security reasons.  If so, this parameter should be used.
 +
|-
 +
| client || Which clients are allowed to use this command.  "m", "w", or "mw"
 +
|}
 +
__NOTOC__
 +
== Examples ==
 +
 +
=== Normal command ===
 +
 
<pre><nowiki>{{Command
 
<pre><nowiki>{{Command
 
|name=says
 
|name=says
 
|parameters=<text>
 
|parameters=<text>
 
|desc=Outputs <text> to channel without formatting.
 
|desc=Outputs <text> to channel without formatting.
 +
|client=w
 
}}</nowiki></pre>
 
}}</nowiki></pre>
  
Line 11: Line 32:
 
|parameters=<text>
 
|parameters=<text>
 
|desc=Outputs <text> to channel without formatting.
 
|desc=Outputs <text> to channel without formatting.
 +
|client=w
 +
}}
 +
 +
=== Disabled, One-Liner ===
 +
 +
<pre><nowiki>{{Command
 +
|name=evil
 +
|parameters=<user> <password>
 +
|disabled=true
 +
}}</nowiki></pre>
 +
 +
Shows as:
 +
 +
{{Command
 +
|name=evil
 +
|parameters=<user> <password>
 +
|disabled=true
 
}}
 
}}

Latest revision as of 23:33, 3 February 2011

Parameters
Name Description
name Name of command, without the beginning slash.
parameters Parameters of the command.
desc Description of the command. Optional. Only one line if it doesn't exist, good for Category:Commands
disabled Sometimes commands are disabled for security reasons. If so, this parameter should be used.
client Which clients are allowed to use this command. "m", "w", or "mw"

Examples

Normal command

{{Command
|name=says
|parameters=<text>
|desc=Outputs <text> to channel without formatting.
|client=w
}}

Shows as:

{{#switch: w |m={{#set:Client=Main}} |w={{#set:Client=Widget}} |mw={{#set:Client=Main}} {{#set:Client=Widget}} }}{{#set:Type=}}/says {{#if:<text>|<text>|}}{{#if: | [{{{disabled}}}]|}}{{#if: Outputs <text> to channel without formatting.|:Outputs <text> to channel without formatting.|}}{{#if:

| :Output:  {{{output}}} | }}

Disabled, One-Liner

{{Command
|name=evil
|parameters=<user> <password>
|disabled=true
}}

Shows as:

{{#switch: mw |m={{#set:Client=Main}} |w={{#set:Client=Widget}} |mw={{#set:Client=Main}} {{#set:Client=Widget}} }}{{#set:Type=}}/evil {{#if:<user> <password>|<user> <password>|}}{{#if: true| [true]|}}{{#if: |:{{{desc}}}|}}{{#if:

| :Output:  {{{output}}} | }}