Difference between revisions of "2.0/Modules/m rewrite"
From AnopeWiki
(Created page with "{{Language|2.0/Modules/m_dns}} {{Header|m_dns|Extra_Modules|Anope}} == <div class="moduleheader">Description</div> == Allows you to re-write any command that it sent to/from...") |
|||
Line 1: | Line 1: | ||
− | {{Language|2.0/Modules/ | + | {{Language|2.0/Modules/m_rewrite}} |
− | {{Header| | + | {{Header|m_rewrite|Extra_Modules|Anope}} |
Latest revision as of 22:08, 12 May 2014
Language | |
---|---|
English |
|
Description
Allows you to re-write any command that it sent to/from clients.
- command {...}
- The rewritten command
- service=
- The service having it's command re-written.
- rewrite=
- Enable or disable the individual re-write of the command.
- rewrite_source=
- What to watch for to rewrite.
- rewrite_target=
- What to change the command to.
- rewrite_description=
- Description of the re-write.
Examples
Original command typed by user: /msg ChanServ CLEAR #myChannel USERS
What would be seen by Chanserv: /msg ChanServ KICK #myChannel *
Command configuration:
command { service= "ChanServ"; rewrite = true; rewrite_source = "CLEAR $ USERS"; rewrite_target = "KICK $1 *"; rewrite_description = "Clears all users from a channel"; }
Default Configuration
/* * m_rewrite * * Allows rewriting commands sent to/from clients. */ #module { name = "m_rewrite" } #command { service = "ChanServ"; name = "CLEAR"; command = "rewrite" /* Enable m_rewrite. */ rewrite = true /* Source message to match. A $ can be used to match anything. */ rewrite_source = "CLEAR $ USERS" /* * Message to rewrite the source message to. A $ followed by a number, eg $0, gets * replaced by the number-th word from the source_message, starting from 0. */ rewrite_target = "KICK $1 *" /* * The command description. This only shows up in HELP's output. * Comment this option to prevent the command from showing in the * HELP command. */ rewrite_description = "Clears all users from a channel" }