<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to Custom Console Commands</title><link>https://sourceforge.net/p/commandsex/wiki/Custom%2520Console%2520Commands/</link><description>Recent changes to Custom Console Commands</description><atom:link href="https://sourceforge.net/p/commandsex/wiki/Custom%20Console%20Commands/feed" rel="self"/><language>en</language><lastBuildDate>Tue, 24 Apr 2012 20:51:04 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/commandsex/wiki/Custom%20Console%20Commands/feed" rel="self" type="application/rss+xml"/><item><title>WikiPage Custom Console Commands modified by Zathrus Writer</title><link>https://sourceforge.net/p/commandsex/wiki/Custom%2520Console%2520Commands/</link><description>&lt;pre&gt;--- v1 
+++ v2 
@@ -23,28 +23,38 @@
 * **/{ci}console command, case insensitive/** ==&gt; *replacement command*
 * **/{cc}console command, keeping letter case/** ==&gt; *replacement uppercased command*
 
+For **scripting** (e.g. to replace 1 command with multiple others), use the following syntax:
+
+    /console command/ =={
+        1st command to execute
+        2nd command to execute
+        ....
+    }
+
+Please note that the closing bracket -&gt; **}** &lt;- must always be at the beginning of a line.
+
 The **{ci} and {cc}** switches are special to **CommandsEX**. They must be listed at the beginning of the regular expression. As the example above states, if **{ci}** is used, **CommandsEX** will search for the command given ignoring letter case. This way, you can easily catch typos like "/helP", "/Help" etc.
 
 The **{cc}** switch will check if the command entered in the console is uppercase and if it is, **CommandsEX** will automatically make the command replacement uppercase as well.
 
 ----
 
 Back references support
 ---
 **CommandsEX** supports back references following [java's model](http://www.regular-expressions.info/java.html) (e.g. $1 - $9), adding reference $p for player's name (not display name, but the real user name).
 
 These are some more **examples** of how back references work (these are applicable to player commands and are here only for reference):
 
 * /cmode/ ==&gt; gamemode $p 1 *(switches game mode of the player to creative)*
 * /smode/ ==&gt; gamemode $p 0 *(switches game mode of the player to survival)*
 * /promote (.*)/ ==&gt; pex promote $1
 * /demote (.*)/ ==&gt; pex demote $1
 
 ----
 
 Known caveats:
 ---
-Regexs do not always execute in the right order, so, for example, a chat message containing the "MF-word" will be caught, instead, by the "F-word" replacement, despite the "F-word" regex being placed after the "MF-word" regex in the chat replacement list.
+Command words (regexes matching against the chat which execute commands) run the commands before the chat message is broadcast, instead of afterward. The commands are still run in response to what you say in chat, it just doesn't seem like it...
 
 ----
 
&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Zathrus Writer</dc:creator><pubDate>Tue, 24 Apr 2012 20:51:04 -0000</pubDate><guid>https://sourceforge.net7d86889237babefd39d7a9b6d2ac529ae5f67f00</guid></item><item><title>WikiPage Custom Console Commands modified by Zathrus Writer</title><link>https://sourceforge.net/p/commandsex/wiki/Custom%2520Console%2520Commands/</link><description>Custom Console Commands
---
This is an **event handling function** that monitors console commands and changes them based on settings from a config file.

This function loads command replacements from file called **consolecmd.txt** (unless file name is changed in the plugin config file), located in the **CommandsEX directory** in your plugins folder. If the config file doesn't exist, it will be created automatically.

----

How to remove this feature
---

Should there be a need to manually remove this feature from the JAR file, the following file must be removed: ***com/github/zathrus_writer/commandsex/handlers/Handler_replaceconsolecommand.class***

----

Configuration file syntax
---
**CommandsEX** uses regular expressions to match commands against texts provided in the config file. You can use any regular expression [supported by Java](http://download.oracle.com/javase/tutorial/essential/regex) and [test them here](http://regexpal.com) (basic stuff) [or here](http://www.solmetra.com/scripts/regex/index.php) (advanced stuff).

The actual format of your config file must follow this principle:

* **/console command/** ==&gt; *replacement command*
* **/{ci}console command, case insensitive/** ==&gt; *replacement command*
* **/{cc}console command, keeping letter case/** ==&gt; *replacement uppercased command*

The **{ci} and {cc}** switches are special to **CommandsEX**. They must be listed at the beginning of the regular expression. As the example above states, if **{ci}** is used, **CommandsEX** will search for the command given ignoring letter case. This way, you can easily catch typos like "/helP", "/Help" etc.

The **{cc}** switch will check if the command entered in the console is uppercase and if it is, **CommandsEX** will automatically make the command replacement uppercase as well.

----

Back references support
---
**CommandsEX** supports back references following [java's model](http://www.regular-expressions.info/java.html) (e.g. $1 - $9), adding reference $p for player's name (not display name, but the real user name).

These are some more **examples** of how back references work (these are applicable to player commands and are here only for reference):

* /cmode/ ==&gt; gamemode $p 1 *(switches game mode of the player to creative)*
* /smode/ ==&gt; gamemode $p 0 *(switches game mode of the player to survival)*
* /promote (.*)/ ==&gt; pex promote $1
* /demote (.*)/ ==&gt; pex demote $1

----

Known caveats:
---
Regexs do not always execute in the right order, so, for example, a chat message containing the "MF-word" will be caught, instead, by the "F-word" replacement, despite the "F-word" regex being placed after the "MF-word" regex in the chat replacement list.

----

Credits:
---
This functionality has been merged from the former [**Commander plugin**](http://dev.bukkit.org/server-mods/commander), developed by [**tustin2121**](http://dev.bukkit.org/profiles/tustin2121)</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Zathrus Writer</dc:creator><pubDate>Mon, 12 Mar 2012 01:04:46 -0000</pubDate><guid>https://sourceforge.net2f49d65e79a7843cc5a11d6c94428793d8cf7a8b</guid></item></channel></rss>